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

3 次查看(过去 30 天)
How to convert '123' to [1,2,3]? Which is the shortest way?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by