how i reshape data matrix?

1 view (last 30 days)
yasmeen hadadd
yasmeen hadadd on 27 Sep 2016
Commented: KSSV on 28 Sep 2016
Hello;
h have a matrix with size 66x100 how i change it's size to 1x6600
thanks

Accepted Answer

José-Luis
José-Luis on 27 Sep 2016
Edited: José-Luis on 27 Sep 2016
bla = rand(66,100);
bla = bla(:)';
Please read the documentation on reshape

More Answers (1)

KSSV
KSSV on 27 Sep 2016
Edited: KSSV on 27 Sep 2016
A = rand(66,100) ;
A = A(:) ; % joins column by column
% if you want row by row
A = rand(66,100) ;
A = A' ;
A = A(:) ;
  2 Comments
José-Luis
José-Luis on 27 Sep 2016
That would give column vector and not a row vector.
KSSV
KSSV on 28 Sep 2016
Transposing it gives a column vector.

Sign in to comment.

Categories

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