Precision with sscanf!
Precision with sscanf!
(OP)
Hello!
I have the following problem with the sscanf command.
The doubles of the following line should be read out:
S=' 1.000000E+00 G -3.374722E-05 2.751758E-05 1.076888E-03 8'
If i use the following command:
A=sscanf(S,'%f %c %f %f %f %f')'
I get:
A =
1.0000 71.0000 -0.0000 0.0000 0.0011 8.0000
My doubles get cut off. sscanf doesn't get all of the information.
If i use: A=sscanf(S,'%.16f %c %.16f %.16f %.16f %.16f')' i get nothing!
But if i use this syntax for sprintf, it works, why not with sscanf.
Does someone has a hint for me!
Thanks in advance!
Georg
I have the following problem with the sscanf command.
The doubles of the following line should be read out:
S=' 1.000000E+00 G -3.374722E-05 2.751758E-05 1.076888E-03 8'
If i use the following command:
A=sscanf(S,'%f %c %f %f %f %f')'
I get:
A =
1.0000 71.0000 -0.0000 0.0000 0.0011 8.0000
My doubles get cut off. sscanf doesn't get all of the information.
If i use: A=sscanf(S,'%.16f %c %.16f %.16f %.16f %.16f')' i get nothing!
But if i use this syntax for sprintf, it works, why not with sscanf.
Does someone has a hint for me!
Thanks in advance!
Georg





RE: Precision with sscanf!
RE: Precision with sscanf!
Yes, I have! But the problem seems to be a option for display, because if i calculate with them, the result is o.k. So it is saved proper, but not displayed. Funny!
As long as the results are o.k, I do not mind!
Greets
RE: Precision with sscanf!
Look at the helpdesk. Seek for the format command. Thats the way how to change the display-accuracy!
Greets