convert double to string!
1 132 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
fatemeh
le 29 Déc 2013
Commenté : Azzi Abdelmalek
le 29 Déc 2013
I want convert double number like 0.222833 to string but when i using num2str the number convert to '0.22283' and sixth digit of number is removed ,can u help me to convert it to string?
0 commentaires
Réponse acceptée
Azzi Abdelmalek
le 29 Déc 2013
a=0.222833
a=sprintf('%.6f',a)
2 commentaires
Azzi Abdelmalek
le 29 Déc 2013
%or
b=sprintf('%.20f',a);
idx=regexp(b,'0+','start');
b(idx(end):end)=[]
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Characters and Strings 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!