I'm trying to convert eight digit numbers from strings to numbers using the str2num function. It seems like there is some sort of rounding issue though, because once they are converted the numbers are off by a digit in a seemingly random direction.
For instance, I know the result should be 22224047 and I end up with 22224048 (or 22224046). Any suggestions on how to solve this?
On the latest Igor version on Macintosh, this seems to work properly.
January 9, 2012 at 03:35 pm - Permalink
It looks like you are converting integers; if not, also be aware that num2str gives you six-digit precision.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 9, 2012 at 04:43 pm - Permalink