How to rearrange data in matrix ?
1 回表示 (過去 30 日間)
古いコメントを表示
Pradya Panyainkaew
2017 年 12 月 18 日
コメント済み: Pradya Panyainkaew
2017 年 12 月 18 日
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 件のコメント
採用された回答
Stephen23
2017 年 12 月 18 日
>> A = 1:15;
>> reshape(A,5,3).'
ans =
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
>>
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!