how to convert char data to Double?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a data like
0.104895105
0.112244898
0.139534884
I converted it to binary but it becomes a char data after conversion . how can i convert back to double so that nnstart can take it as input.
kindly help me with it . tx
7 commentaires
Réponses (1)
Walter Roberson
le 20 Oct 2015
t = MyNum2Bin(A,4,0,1); %your existing call
u = t - '0'; %now it is 0 and 1's
Note: your MyNum2Bin code treats negative values as positive values.
2 commentaires
Walter Roberson
le 20 Oct 2015
Avec = reshape( (dec2bin(floor(A*16), 4) - '0').', 1, []);
"Take it as input" is too vague. Take it as input to what? And what format does the input require?
Voir également
Catégories
En savoir plus sur Data Type Conversion dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!