[Convert from Double to Single]
Mostra commenti meno recenti
Hello Everyone,
Currently, during Simulation I have a issue, Please help me........
Issue : ( at the command windown)
value = 214748364.7 // Data type is default double.
value_single = single(value) // The result of this convertion is 214748368
my expectation value is value_single = 214748364.7
What is happened ?
Please help me.............!!!
Thank you in advance.
2 Commenti
Shubham Gupta
il 15 Nov 2019
I think What you are expecting is not possible for a single type value. It has something to do with the precision for single. Either reduce the value or if you want to use big numbers then I would suggest using double type.
Binh Huynh Thanh
il 15 Nov 2019
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!