trivial matrix question: how to rearrange matrices in a given order
1 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I know this could seems trivial and meybe here we are talking about the very matlab basics, but as I am dealing with really big data structures, I would like to receive some support.
I have the following matrix, as shown in 1:
I would like to reshape it to be as in 2, and back again to point 1.
Thanks in advance
0 个评论
采纳的回答
更多回答(1 个)
chicken vector
2023-4-27
编辑:chicken vector
2023-4-27
A = reshape(1:3^3,3^2,[])
B = permute(reshape(A',[],3,3),[2,1,3])
A = reshape(B,[],3)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!