seperating digits as a separate element

2 次查看(过去 30 天)
Let say we have a variable A=[34 56], i want to write it as A=[3 4 5 6] that is to make each digit of a number a separate variable, how can I do this in MATLAB.

采纳的回答

Walter Roberson
Walter Roberson 2011-3-20
sprintf('%d',A) - '0'
  1 个评论
Zain ul Aabidin
Zain ul Aabidin 2011-3-20
Thanks Sir..this is what I am looking for. But can you tell me how this command is working.I mean what is actually happening in this command?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by