How can I make this operation on two matrixes ?

1 visualización (últimos 30 días)
fathi
fathi el 21 de Jul. de 2017
Comentada: fathi el 21 de Jul. de 2017
Hi every body
I have two matrixes as : M = [ 2, 8, 12 ] and K = [ 4 ,1 , 5 ].
So How can i get Z = [ 2, 4, 8, 1, 12, 5]. I mean the first value in the Z took from first value in M and the second value in Z from first value from K. And the third value in Z is the second in M and the fourth value in Z is the second value in K and so on, one by one.
Thank you

Respuesta aceptada

Walter Roberson
Walter Roberson el 21 de Jul. de 2017
reshape([M;K], 1, [])

Más respuestas (0)

Categorías

Más información sobre Logical 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