필터 지우기
필터 지우기

Rotate 3D matrix

조회 수: 29 (최근 30일)
Johanna Popp
Johanna Popp 2021년 6월 18일
편집: Johanna Popp 2021년 6월 18일
Hi all :)
My problem seems to be quite simple but I can't figure it out somehow.
I have a 3D array size 376x376x30 and I would like to rotate it so that the dimensions are 30x376x376 instead.
Thanks for your help!

답변 (1개)

Jan
Jan 2021년 6월 18일
편집: Jan 2021년 6월 18일
X = rand(2, 3, 4);
Y1 = permute(X, [3,1,2]);
size(Y1)
ans = 1×3
4 2 3
Y2 = permute(X, [3,2,1]);
size(Y2)
ans = 1×3
4 3 2
By the way, "matrix" means 2D by definition. You have a "3D array".
  댓글 수: 1
Johanna Popp
Johanna Popp 2021년 6월 18일
Thanks for your help!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by