reshaping a matrix in a special way
Show older comments
Hi!
How to reshape this matrix:
% A= 1 2
3 4
5 6
7 8
9 1
8 5
. .
. .
to this matrix
%B=1 3 5 2 4 6
7 9 8 8 1 5
. . . . . .
i didnot get it with reshape
Thnx
Answers (1)
Andrei Bobrov
on 13 Nov 2012
B = reshape(permute(reshape(A,3,2,[]),[2 1 3]),2,[]);
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!