Clear Filters
Clear Filters

creating 2D matrid from 3D matrix

2 views (last 30 days)
I have a matrix F of size 201*3*201. I want to create another matrix Z of size 40401*3. I can do this as: Z=[F(:,:,1);F(:,:,2);......F(:,:,201)]; But how can I do this more quickly using loop or by any other tricks?

Accepted Answer

Walter Roberson
Walter Roberson on 22 Dec 2011
Z = reshape( permute(F, [1 3 2]), [], 3);
  1 Comment
Bibek
Bibek on 23 Dec 2011
Thanks for your input. It worked for me exactly in the way I wish

Sign in to comment.

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!