From help-request at octave dot org Fri Sep 30 07:34:24 2005 Subject: load %a format ascii From: "Kevin H. Hobbs" To: help at octave dot org Date: Fri, 30 Sep 2005 08:32:37 -0400 --=-eRJM9HJ2Nkhd6y6+ViKf Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 ).=20 Could Octave be made to load them? --=-eRJM9HJ2Nkhd6y6+ViKf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDPTBlqBtEuW+gRPERAipbAJ9ndC+jLYa4eLg7YuCuO9nwEdPWMwCfZWNW FzHp3bu8Mpvm44a5bJ9o/lY= =qbdB -----END PGP SIGNATURE----- --=-eRJM9HJ2Nkhd6y6+ViKf-- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------