I need to manipulate this matrix

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

Asked:

on 8 May 2014

Edited:

on 8 May 2014

Community Treasure Hunt

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

Start Hunting!