Problem in string-number concatenation
Mostrar comentarios más antiguos
hello, I am trying to concatenate two matrices, A=['a1';'a2';'a3';'a4'] and Z=[190;64;4;5]. I am not able to do so.
Can someone help please. Thanks Annika
1 comentario
Hikaru
el 21 de Ag. de 2014
What kind of format do you want for the output?
Respuesta aceptada
Más respuestas (1)
David Sanchez
el 21 de Ag. de 2014
Define your A array as a cell using brackets { }:
A={'E';'F';'G';'H';'I';'J';'K';'L';'M';'N';'O';'P';'Q';'R';'S';'T';'U';'V';'W';'X';'Y';'Z';'D'};
Iy =[ 190 64 4 5 190 95 4 190 65 65 150 190 190 66 185 5 190 43 185 2 5 100 4];
B=Iy';
r=[A,num2cell(B)];
1 comentario
Annika
el 21 de Ag. de 2014
Categorías
Más información sobre Numeric Types en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!