Filter löschen
Filter löschen

seperating digits as a separate element

2 Ansichten (letzte 30 Tage)
Zain ul Aabidin
Zain ul Aabidin am 20 Mär. 2011
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Mär. 2011
sprintf('%d',A) - '0'
  1 Kommentar
Zain ul Aabidin
Zain ul Aabidin am 20 Mär. 2011
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?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays 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