Numeric values converted to string

3 ビュー (過去 30 日間)
Davide Conti
Davide Conti 2019 年 10 月 30 日
回答済み: Harsha Priya Daggubati 2019 年 11 月 4 日
I have a matrix:
A = [ '3 5 6 8' ; 5 ; '1 19 21 26' ; '2,16,27,28' ; 26 ; '19,21' ]
How can i make a loop that returns the matrix B with numeric values converted to string?
B = [ '3 5 6 8' ; '5' ; '1 19 21 26' ; '2,16,27,28' ; '26' ; '19,21' ]

回答 (1 件)

Harsha Priya Daggubati
Harsha Priya Daggubati 2019 年 11 月 4 日
Hi,
I think it is not possible to create a matrix like A in MATLAB. If you have just provided matrix A as an example, I suggest using num2str function in MATLAB.
Hope this helps!

カテゴリ

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