c=1; a=[4 7] sprintf("cnt %d - [",c) + num2str(a) + "]"
how to convert vector in string as example
3 ビュー (過去 30 日間)
古いコメントを表示
Input: c and a
c=1;
a=[4 7]
"cnt 1 - [4 7]"
c=2;
a=[8 9]
"cnt 2 - [8 9]"
0 件のコメント
採用された回答
その他の回答 (1 件)
Alexander
2023 年 9 月 2 日
My solution:
c=1;
a=[4 7]
resultTxT =['"cnt ' num2str(c) ' - [' num2str(a) ']"']
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!