フィルターのクリア

Sorting rows into colums

1 回表示 (過去 30 日間)
Contoso Donoso
Contoso Donoso 2022 年 5 月 7 日
コメント済み: Contoso Donoso 2022 年 5 月 8 日

Hello!
Im having a problem sorting a matrix
The matrix A is of size 1020x12

I want the 10 first rows of matrix A (consecutevely from left to right) to form the firt colum of matrix B and I need to do this every 10 rows from the whole matrix A to creat the matrix B of size 120,102
I would really appreciaty your help
Thanks in advance

  1 件のコメント
Contoso Donoso
Contoso Donoso 2022 年 5 月 7 日

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

採用された回答

Jan
Jan 2022 年 5 月 7 日
A = rand(1020, 12);
B = reshape(A.', 120, 12);
  1 件のコメント
Contoso Donoso
Contoso Donoso 2022 年 5 月 8 日
Yep! that's it! Thank you very much @Jan. The only thing is that B matrix is 120x102, but this does exactly what I was needing. Thanks again you, have saved so much time to this unexperienced person (me).

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by