How to rearrange data in matrix ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Pradya Panyainkaew
am 18 Dez. 2017
Kommentiert: Pradya Panyainkaew
am 18 Dez. 2017
if I have A=[1:15].
After that, I want to rearrange matrix A to get a result: MyResult=[1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15];
How can I code to get the result like this ?
0 Kommentare
Akzeptierte Antwort
Stephen23
am 18 Dez. 2017
>> A = 1:15;
>> reshape(A,5,3).'
ans =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
>>
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!