Borrar filtros
Borrar filtros

creating 2D matrid from 3D matrix

2 visualizaciones (últimos 30 días)
Bibek
Bibek el 22 de Dic. de 2011
I have a matrix F of size 201*3*201. I want to create another matrix Z of size 40401*3. I can do this as: Z=[F(:,:,1);F(:,:,2);......F(:,:,201)]; But how can I do this more quickly using loop or by any other tricks?

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Dic. de 2011
Z = reshape( permute(F, [1 3 2]), [], 3);
  1 comentario
Bibek
Bibek el 23 de Dic. de 2011
Thanks for your input. It worked for me exactly in the way I wish

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by