1

I have an array of possibly million 3x3 matrices. What would be the fastest way to horizontally concatenate them in MATLAB without using for loop? Ideally I would like to do something simple like this

 [M(:,:,1) M(:,:,2) ... M(:,:,10000000)]

1 Answer 1

5

the way the question is put is to convert a big 3-D matrix M(:,:,j) to a concatenated 2-D one. For that just use reshape, for example:

M=reshape(M,size(M,1),[]);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.