I have a matrix of dimension a=[993,1], I need a matrix b=[331,3] such that every 3 columns of the a forms a row of b
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
the problem is like a=[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18] and I need b of the following form b=[1 2 3;4 5 6; 7 8 9; 10 11 12; 13 14 15; 16 17 18]
1 commentaire
Image Analyst
le 3 Juin 2014
Your a has only 1 column.
Réponses (1)
Mischa Kim
le 3 Juin 2014
Chris, use
b = reshape(a',3,[])'
1 commentaire
Chris Martin
le 3 Juin 2014
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!