How can I make this operation on two matrixes ?

1 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2017-7-21
reshape([M;K], 1, [])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by