I need to manipulate this matrix

1 view (last 30 days)
sermet
sermet on 8 May 2014
Edited: José-Luis on 8 May 2014
A=[10 20 30 40;50 60 70 80;90 100 110 120]
%I need to order each rows vertically like that;
B=[10;20;30;40;50;60;70;80;90;100;110;120]

Accepted Answer

José-Luis
José-Luis on 8 May 2014
Edited: José-Luis on 8 May 2014
B = reshape(A',1,[]);
Alternatively:
B = A';
B = B(:);

More Answers (0)

Categories

Find more on Matrices and Arrays 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!