Filter löschen
Filter löschen

Numeric values converted to string

1 Ansicht (letzte 30 Tage)
Davide Conti
Davide Conti am 30 Okt. 2019
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' ]

Antworten (1)

Harsha Priya Daggubati
Harsha Priya Daggubati am 4 Nov. 2019
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!

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by