フィルターのクリア

how to convert vector in string as example

1 回表示 (過去 30 日間)
Luca Re
Luca Re 2023 年 9 月 2 日
コメント済み: Voss 2023 年 9 月 2 日
Input: c and a
c=1;
a=[4 7]
"cnt 1 - [4 7]"
c=2;
a=[8 9]
"cnt 2 - [8 9]"

採用された回答

Voss
Voss 2023 年 9 月 2 日
c=1; 
a=[4 7]
sprintf("cnt %d - [",c) + num2str(a) + "]"
  4 件のコメント
Luca Re
Luca Re 2023 年 9 月 2 日
thank you
Voss
Voss 2023 年 9 月 2 日
You're welcome!

サインインしてコメントする。

その他の回答 (1 件)

Alexander
Alexander 2023 年 9 月 2 日
My solution:
c=1;
a=[4 7]
resultTxT =['"cnt ' num2str(c) ' - [' num2str(a) ']"']

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by