How can I make this operation on two matrixes ?

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

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 21 Jul. 2017

0 Stimmen

reshape([M;K], 1, [])

Weitere Antworten (0)

Gefragt:

am 21 Jul. 2017

Kommentiert:

am 21 Jul. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by