help-octave
[Top][All Lists]
Advanced

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

Re: Specifying output format with save()


From: Alberto Luaces
Subject: Re: Specifying output format with save()
Date: Mon, 29 Feb 2016 17:25:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mike Miller writes:

> On Fri, Feb 26, 2016 at 13:17:58 +0100, Alberto Luaces wrote:
>> Hello,
>> 
>> 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.

My idea was that Octave is likely to be immune to any kind of whitespace
tinkering, as almost any C program is.  Nevertheless, it is not my
spirit to fight the reality, so thank you for the advice, Mike.

-- 
Alberto




reply via email to

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