Combining a number and a string array (both columns) into a single column string array.
Mostrar comentarios más antiguos
How can the number array:
NUMM=linspace(1,10,10)'
and the string array:
STRR=repmat('X='10,1)
be combined to give a string array?
["X=1"
"X=2"
...
"X=10"]
Respuestas (2)
The simple MATLAB approach:
V = linspace(1,10,10);
S = "X=" + V(:)
1 comentario
Saeid
el 15 de Feb. de 2022
David Hill
el 14 de Feb. de 2022
s=string(strcat(STRR,num2str(NUMM)));
Categorías
Más información sobre Characters and Strings 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!