How to convert '123' to [1,2,3]?

3 Ansichten (letzte 30 Tage)
Mr M.
Mr M. am 12 Dez. 2017
Kommentiert: per isakson am 13 Dez. 2017
How to convert '123' to [1,2,3]? Which is the shortest way?

Akzeptierte Antwort

Image Analyst
Image Analyst am 12 Dez. 2017
For single digits like you have, subtract '0':
s = '123'
numbers = s - '0'

Weitere Antworten (0)

Kategorien

Mehr zu Dates and Time 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