How to rearrange data in matrix ?

1 回表示 (過去 30 日間)
Pradya Panyainkaew
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 ?

採用された回答

Stephen23
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
>>
  1 件のコメント
Pradya Panyainkaew
Pradya Panyainkaew 2017 年 12 月 18 日
Thank you so much...Stephen Cobeldick..^_^

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by