[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: precision of values stored when using save()
From: |
Tim Rueth |
Subject: |
RE: precision of values stored when using save() |
Date: |
Thu, 30 Sep 2010 14:03:48 -0700 |
> -----Original Message-----
> From: John W. Eaton [mailto:address@hidden
> Sent: Thursday, September 30, 2010 1:05 PM
> To: address@hidden
> Cc: address@hidden
> Subject: precision of values stored when using save()
>
> On 30-Sep-2010, Tim Rueth wrote:
>
> | I am using the save() function to store a matrix in a file,
> which will
> | later get loaded using load() by another program. I'd also
> like the
> | format of this file to be human-readable, which it is
> already, except
> | that the precision that
> | save() uses is far greater than needed, and makes the
> matrix hard to
> | read by a human. Some of the elements of this matrix show
> 16 decimals
> | of precision, when I only need 2.
> |
> | So, I thought I'd do:
> |
> | var1 = round(var1 * 100) / 100;
> |
> | for each variable, but save() still stores all 16 digits in those
> | cases. Any ideas of how to format elements saved using save()? I
> | could do fopen/fdisp/ sprintf..., but then that makes it more
> | complicated to read back all the data into the next
> program. Save() and load() are perfect for this.
>
> help save_precision
>
> jwe
Perfect! Is there a list of available functions somewhere and links to
their definitions?
Thanks,
--Tim