Adding matrix values into a string

2 ビュー (過去 30 日間)
Ilan Kurtser
Ilan Kurtser 2020 年 12 月 2 日
コメント済み: Ilan Kurtser 2020 年 12 月 2 日
Hello,
I want to turn a matrix
a=[1 2 3 4 5 6 7 8 9] for say
into a string with the three first values of the array
b=123;
Any ideas how to do it?

採用された回答

KSSV
KSSV 2020 年 12 月 2 日
a=[1 2 3 4 5 6 7 8 9] ;
str = char(a+'0')
str = '123456789'
  3 件のコメント
KSSV
KSSV 2020 年 12 月 2 日
a=[1 2 3 4 5 6 7 8 9] ;
str = char(a(1:3)+'0')
str = '123'
Ilan Kurtser
Ilan Kurtser 2020 年 12 月 2 日
Thank you very much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by