Need a space in strcat comand
古いコメントを表示
V = [1 2 3 4 5];
strcat ('R = ', strjoin(string( V),', '))
I got the following answer while running the above code
"R =1, 2, 3, 4, 5"
But i need (a white space after '=' sign)
"R = 1, 2, 3, 4, 5"
1 件のコメント
The solution is already given in the STRCAT documentation:
V = 1:5;
strcat({'R = '},strjoin(string( V),', '))
採用された回答
その他の回答 (1 件)
V = [1 2 3 4 5];
str = sprintf('R = %s', strjoin(string( V),', '))
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!