Combining a number and a string array (both columns) into a single column string array.
이전 댓글 표시
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"]
답변 (2개)
The simple MATLAB approach:
V = linspace(1,10,10);
S = "X=" + V(:)
David Hill
2022년 2월 14일
s=string(strcat(STRR,num2str(NUMM)));
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!