mystring = ['+03119.358368 +00059.509320'; '+03119.359514 +00059.360184'];
I'm using
mynumbers = msscanf(-1, '%f %f', mystring);
But the results that I'm getting are truncated, to what appears to be
single-precision floating point. Is this an inescapable deficit with
msscanf? If not, how do I coerce msscanf into doing this with full
precision? If it is, is there an alternate built-in function that will
do this, or do I need to come up with some work around?
Thanks.
Answered my own question:
mynumbers = msscanf(-1, '%lf %lf', mystring);
note the 'lf' instead of 'f'.
THAT'S IT?????
Since you're plugging things into doubles anyway, you couldn't just make
that DEFAULT?????
Oh well, onward and upward, I guess.
Oops. That's not it -- it was leftovers from a previous attempt,
apparently.
So, is there a way?
Newsgroups are such a nice forum for publicly embarrassing oneself.
'%lg'. _Not_ '%f', '%g', or '%lf'.
Oh well, at least now my app works better...
Also:
mynumbers = msscanf(-1, mystring, '%lg %lg');
and not:
mynumbers = msscanf(-1, '%lg %lg', mystring);
;-)
> Oh well, at least now my app works better...
Congratulations.
Francois