How can I convert a string to a double precision decimal number without losing the leading zeros ?
Show older comments
Hi, I am trying to convert a string to a double precision number using str2double.
Since my string has leading zeros, i.e., '-0,01298784', when I convert it to double, it comes like -1298784. How can I make sure the leading zeros are still there after conversion?
Notice that is I don't know beforehand how many zeros are there, so it may vary.
Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!