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

6 Ansichten (letzte 30 Tage)
Andrew Alkiviades
Andrew Alkiviades am 20 Jun. 2012
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Jun. 2012
reshape(A, [size(A,1) * size(A,2), size(A,3)])

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by