How to reshape two matrices row wise with out changing the order

1 次查看(过去 30 天)
Hi,
I have below two matrix (cell array matices):
A={'KAL' '29' '56' 'norespose' '90';'GYT' '69' '14' 'respose' '1';'2' '10' '14' '45' '150'};
B={'PAY' 'JAK' '12' '11' '9';'4' '111' '171' '13' '222';'2' '10' '14' '45' '340'};
My desired output:
[KAL 29 56 norespose 90 PAY JAK 12 11 9 GYT 69 14 respose 1 4 111 171 13 222 2 10 14 45 150 2 10 14 45 340];
I useed: Areshape=reshape(A',1,15);
Breshape=reshape(B',1,15);
and AB=[A;B];
But I can not get my desired output.
1. I want do: [row1_A row1_B row2_A row2_B row3_A row3_B];

采纳的回答

Stephen23
Stephen23 2017-10-2
reshape([A,B]',1,[])

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by