Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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];

Respuesta aceptada

Stephen23
Stephen23 el 2 de Oct. de 2017
reshape([A,B]',1,[])

Más respuestas (0)

Categorías

Más información sobre Get Started with Statistics and Machine Learning Toolbox 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