I want to multiply the first two numbers of a digit together and subtract the third from it!
Ältere Kommentare anzeigen
I have the number
223456
I want to multiply the first two digits together and subract by the third. example from above: 2*2-3
I have made the number into a string using the following:
%convert the number to individual digits digits = code_string - '0';
so as far as I know the matrix looks like: [2 2 3 4 5 6] and again I want to multiply the first number by the second and subtract the third.
Thanks!
Lucky
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings 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!