Convert a number to a vector
Ältere Kommentare anzeigen
I'm working on a code that coverts ASHRAE refrigerant numbers to a chemical formula. I'm trying to convert a number ex: 123 to a vector [1 2 3] (from there the code falls into place). I've looked at this board with a similar question and copying and pasting the codes doesn't look the same for me. The comenters posted this code num2str(1234)*1+'0' => [1, 2 ,3, 4] but when I post the same code with a cleared command window I get the following;
num2str(1234)*1+'0'
ans =
97 98 99 100
2 Kommentare
Roger Stafford
am 13 Mär. 2016
You need to make it clear whether you are dealing with strings of characters or numerical values.
monica garcia
am 13 Mär. 2016
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Chemistry 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!