a basic question in matlab

Hello all,
If I have a 1xLxN matrix and would like to reshape it in order to get a LxN matrix, how I can do that? In particular, suppose I have a 1x2x4 matrix a:
a(1,:,1)=[0 0]; a(1,:,2)=[0 1];a(1,:,3)=[1 1];a(1,:,4)=[0 1];
and I would like to get a 4x2 matrix of [0 0;0 1;1 1;0 1]? Thanks.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 21 de Jun. de 2015
Editada: Azzi Abdelmalek el 21 de Jun. de 2015

1 voto

Edit
squeeze(a).'

1 comentario

Walter Roberson
Walter Roberson el 21 de Jun. de 2015
Azzi, I'm not sure why you put the conjugate transpose in?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

Mnr
el 21 de Jun. de 2015

Editada:

el 21 de Jun. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by