How to reshape my matrix A to B

1 回表示 (過去 30 日間)
PRED LIU
PRED LIU 2020 年 6 月 8 日
コメント済み: madhan ravi 2020 年 6 月 8 日
How to reshape my matrix A to B ??
A(:,:,1)=[ 8, 1, 6 ;...
3, 5, 7 ;...
4, 9, 2 ]
A(:,:,2)=[16, 2, 12 ;...
6, 10, 14 ;...
8, 18, 4 ]
A(:,:,3)=[24, 3, 18 ;...
9, 15, 21 ;...
12, 27, 6 ]
B= 8 1 6
3 5 7
4 9 2
16 2 12
6 10 14
8 18 4
24 3 18
9 15 21
12 27 6

採用された回答

KSSV
KSSV 2020 年 6 月 8 日
B = reshape(permute(A,[2 1 3]),3,[])'
  6 件のコメント
KSSV
KSSV 2020 年 6 月 8 日
2020a
madhan ravi
madhan ravi 2020 年 6 月 8 日
? OP is using 2019b

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by