Converting a String to Double without str2double
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sanjin Spahic
le 10 Déc 2020
Modifié(e) : Sanjin Spahic
le 10 Déc 2020
So I have to write a Programm that converts a binary code into a dezimal number.
The problem is that we insert the binary code in form of a string and I'm not supposed to use the str2double command to convert the string.
0 commentaires
Réponse acceptée
Geoff Hayes
le 10 Déc 2020
Sanjin - why do you need to convert it using str2double?
check=z(k);
In the above check is a character so you could compare it to '0' or '1'. If neither of these characters, then it is invalid.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!