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

1 vue (au cours des 30 derniers jours)
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];

Réponse acceptée

Stephen23
Stephen23 le 2 Oct 2017
reshape([A,B]',1,[])

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by