How to turn string into numbers it represents without using str2num?
Afficher commentaires plus anciens
The only functions allowed are:
zeros, ones, reshape, repmat, length, size, max, min, mod, all, any, sort, find, floor, ceil, round, log10, sum
1 commentaire
James Tursa
le 29 Nov 2015
If you were to do this by hand, do you have any ideas about how you would go about it? E.g., how could you figure out the first digit?
Réponses (1)
Walter Roberson
le 29 Nov 2015
0 votes
You cannot do that. Converting a string into a number requires addition (and multiplication makes it easier.) You would also need to index into the string, but indexing is a function.
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!