concatenating even and odd rows

1 visualización (últimos 30 días)
Ayesha Punjabi
Ayesha Punjabi el 17 de Abr. de 2019
Comentada: Ayesha Punjabi el 17 de Abr. de 2019
I have a matrix. and I am trying to place odd rows on the left side and even rows data on the right sid
which means row 2 data will be placed in 17 to 32 columns of row 1
row 3 data will be placed in row 2 (1 to 16 columns ) and row 4 data will be placed in 17 to 32 columns of row 2.
row 5 data will be placed in row 3 (1 to 16 columns) and row 6 data will be placed in 17 to 32 columns of row 3
Capture.JPG

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 17 de Abr. de 2019
A=rand(10,16);
B=[A(1:2:end,:),A(2:2:end,:)]
  1 comentario
Ayesha Punjabi
Ayesha Punjabi el 17 de Abr. de 2019
you saved my life.... thankks a lot

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

Community Treasure Hunt

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

Start Hunting!

Translated by