[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: truncated data using 'save'
From: |
Sergei Steshenko |
Subject: |
Re: truncated data using 'save' |
Date: |
Mon, 22 Dec 2008 04:10:21 -0800 (PST) |
--- 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.