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 CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by