how do you stack (using colon) a 3 dimensional matrix

조회 수: 3 (최근 30일)
Andrew Alkiviades
Andrew Alkiviades 2012년 6월 20일
Hi
I have a 3 dimensional matrix A(:,:,K) which I want to stack all the columns per value of K
I haven't found the coding for a 3 dimensional matrix (otherwise I expect to have used B = A(:) which in this case doesn't seem to work

채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 20일
reshape(A, [size(A,1) * size(A,2), size(A,3)])

추가 답변 (0개)

카테고리

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