|Subject:||Re: Specifying output format with save()|
|Date:||Fri, 26 Feb 2016 15:40:43 -0500|
On Fri, Feb 26, 2016 at 13:17:58 +0100, Alberto Luaces wrote:
> is there any way to specify a desired format (width, decimal places)
> when saving variables with save()?
> My problem is that I want to read the file at a later stage with
> Fortran, and it does not allow that the numbers have different widths,
> including spaces.
> I read about save_precision(), but it seems that only decimal places can
> be specified.
> I think I could do what I want with fprintf, but I would like to know if
> there is a much more direct solution using save().
Doubtful. The primary purpose of the save function is to be read by
Octave's load function, not to be compatible with any other formats or
tools. I think fprintf is exactly what you want.
|[Prev in Thread]||Current Thread||[Next in Thread]|