help-octave
[Top][All Lists]
Advanced

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

Re: truncated data using 'save'


From: Ben Abbott
Subject: Re: truncated data using 'save'
Date: Mon, 22 Dec 2008 10:34:43 -0500


On Dec 22, 2008, at 7:10 AM, Sergei Steshenko wrote:

--- On Sun, 12/21/08, Sergei Steshenko <address@hidden> wrote:

From: Sergei Steshenko <address@hidden>
Subject: truncated data using 'save'
To: address@hidden
Date: Sunday, December 21, 2008, 1:35 PM
Hello All,

here is a sample session:

"
octave:21> output_precision(25);
octave:22> output_max_field_width(31);
octave:23> foo = 1/3
foo =  3.333333333333333148296162562474e-01
octave:24> save('-ascii', 'foo.txt',
'foo')
octave:25> system('cat foo.txt')
3.33333333e-01
ans = 0
octave:26> version
ans = 3.0.3
"

- as I can see, output file contains less significant
digits than shown on
the terminal.

Any way to set output precision for the 'save'
command ?

Thanks,
 Sergei.



Well, it looks like 'save_precision' is the function to be used to change precision - I came to this tentative conclusion grepping through source
code, but 'help save' does not mention this at all.

Regards,
 Sergei.


There are many places in the documentation that could be improved. Recently several individuals have made this the focus of their contribution. If you are inclined your help would also be appreciated. A full changeset is most desirable. However, if you can suggest the change to save.m's help text, I expect one of use will be happy to take care of the rest.

If you have a copy of the mercurial archive on your computer and have a bash shell available I can send you a script that simplifies creating changesets for individual files.

Ben




reply via email to

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