creating 2D matrid from 3D matrix

1 次查看(过去 30 天)
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?

采纳的回答

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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by