Unfold 3D I x J x K to 2D I x JK

2 visualizaciones (últimos 30 días)
Maxwell Barton
Maxwell Barton el 1 de Ag. de 2019
Editada: KALYAN ACHARJYA el 1 de Ag. de 2019
Hi,
I am trying to unfold a matrix in the form I x J x K to I x JK corresponding to I batches, J variables and K time periods (within the batch).
I currently have got this matrix:
And I need it in the form:
batch wise unfold matrix.PNG
How would I go about doing this as I think reshape is inadequate?
Thanks
  1 comentario
madhan ravi
madhan ravi el 1 de Ag. de 2019
Illustration with a simple example would be better.

Iniciar sesión para comentar.

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 1 de Ag. de 2019
Editada: KALYAN ACHARJYA el 1 de Ag. de 2019
"I am trying to unfold a matrix in the form I x J x K to I x JK"
May be: Are you looking for this one?
[R C D]=size(M);
X=reshape(M,R,C*D)
I ignored this part "corresponding to I batches, J variables and K time periods (within the batch). "

Más respuestas (1)

Bruno Luong
Bruno Luong el 1 de Ag. de 2019
X=M(:,:)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by