Reshape 3d into 2d matrix (in this way)

조회 수: 9 (최근 30일)
Jakov Simjanoski
Jakov Simjanoski 2018년 7월 11일
답변: James Tursa 2018년 7월 11일
I want to convert a 3D matrix A(:,:,1)= [1,2;3,4] A(:,:,2)= [5,6;7,8] A(:,:,3)= [9,10;11,12] into a 2D matrix A=[1,2,5,6,9,10;3,4,7,8,11,12]. Any help is appreciated, thank you in advance.
P.S. I will be working with much bigger matrices, in particular 450x450x450.

채택된 답변

James Tursa
James Tursa 2018년 7월 11일
result = reshape(A,2,[]);

추가 답변 (0개)

카테고리

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

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by