help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

load %a format ascii


From: Kevin H. Hobbs
Subject: load %a format ascii
Date: Fri, 30 Sep 2005 08:32:37 -0400

I've been storing data with printf("%a %a\n", t, x);
because this format can represent doubles exactly (
stupid sometimes chaotic system ). The files look like
this:

-0x1.dffbe76c8b439p+4 -0x1.4392cbdbfacc2p+15
-0x1.dff7ced916872p+4 -0x1.40b178a7bfbb4p+15
-0x1.dff3b645a1cabp+4 -0x1.3f4d0da99f416p+15
-0x1.dfef9db22d0e4p+4 -0x1.3e7b297108af1p+15
-0x1.dfeb851eb851dp+4 -0x1.3df301cd9bd25p+15
-0x1.dfe76c8b43956p+4 -0x1.3d947a34cc4dcp+15
-0x1.dfe353f7ced8fp+4 -0x1.3d4ee6f93eeecp+15
-0x1.dfdf3b645a1c8p+4 -0x1.3d192c7eb9dbfp+15
-0x1.dfdb22d0e5601p+4 -0x1.3ced771785004p+15
-0x1.dfd70a3d70a3ap+4 -0x1.3cc86578af32dp+15

which is approximately:

 -29.999 -41417.39816268675
-29.998 -41048.73565482293
-29.997 -40870.52668473886
-29.996 -40765.58094050538
-29.99499999999999 -40697.50352179472
-29.99399999999999 -40650.23868406724
-29.99299999999999 -40615.45112034478
-29.99199999999999 -40588.58690434274
-29.99099999999999 -40566.73260131481
-29.98999999999999 -40548.19818637367

This is just a 10x2 section to match my printf, but
they could be any dimention. C programs can load them
with scanf, gnuplot can load them, Matlab can load them
( although sometimes they get mangled ). 

Could Octave be made to load them?

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]