how to make string vector?
Ältere Kommentare anzeigen
range = [18,29];
how to make ['18','29']?
int2str(range); is not the solution
1 Kommentar
Contrary to what many beginners think, in MATLAB the square brackets [] are not a list operator, but are a concatenation operator, which means that the given code
['18','29']
will produce one string like this:
'1829'
{'18','29'}
Akzeptierte Antwort
Weitere Antworten (1)
Jos (10584)
am 31 Mär. 2015
You realise that, in ML, ['18','29'] is exactly the same as the single character array '1829' ?
a = [18, 29]
str = sprintf('%d',a)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!