[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: save function
From: |
Mike Miller |
Subject: |
Re: save function |
Date: |
Wed, 9 Mar 2005 12:29:15 -0600 (CST) |
On Wed, 9 Mar 2005, David Bateman wrote:
Getting rid of the "# type:" line basically then means that we go back
to a monolithic and non-extensible function that can only load/save
certain types of variables ("scalar" and "matrix" only).
I would think that most ascii saves are of matrix data. Wouldn't an
additional option like "-ascii-noheader" satisfy those of us who would
like to be able to save a matrix without header lines?
I think we should ask ourselves why someone would want to save Octave data
in ascii format. I think it would mostly be for export to another program
that cannot use the header lines. If it were for storage purposes to
re-import to Octave, the binary format seems to be better: I created a
variable x=rand(200,200) and saved it in ascii and binary formats...
bytes filename
------ ------------
720305 x_ascii.txt
320031 x_binary.bin
The binary file was smaller. Both save and load functions were noticably
faster for binary than for ascii. ASCII therefore seems to be a poor
choice for storing Octave data. On the other hand, a "save -ascii-noheader"
option would be useful. I would not encourage people to use "save -ascii"
when they can use "save -binary", but I am interested in other opinions on
that issue.
What's wrong with having a "save -ascii-noheader" option?
If you want to introduce a matlab compatiable function as a monolithic
function then a new save type "-mat-ascii" in the same vain as
"-mat-binary" makes the most sense. However, I see no reason to invest
myself in such an effort as there are many other ways of achieving
compatiable results between matlab and octave with fprintf, etc.
That makes sense to me. Maybe a line in the 'save' documentation
directing users to fprintf would solve that problem.
Mike
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Re: save function, (continued)
- Re: save function, Hamish Allan, 2005/03/09
- Re: save function, John W. Eaton, 2005/03/09
- Re: save function, Mike Miller, 2005/03/09
- Re: save function, Francesco Potorti`, 2005/03/09
- Re: save function, John W. Eaton, 2005/03/09
- Re: save function, Francesco Potorti`, 2005/03/10
- Re: save function, mavram, 2005/03/09
- Re: save function, Hamish Allan, 2005/03/09
- Re: save function, John W. Eaton, 2005/03/09
- Re: save function, Mike Miller, 2005/03/09
- Re: save function,
Mike Miller <=
- Re: save function, David Bateman, 2005/03/10
- Re: save function, Robert A. Macy, 2005/03/09
- Re: save function, John W. Eaton, 2005/03/09
- Re: save function [take 97], Steve C. Thompson, 2005/03/09
- Re: save function, Jonathan C. Webster, 2005/03/09
- Re: save function, John W. Eaton, 2005/03/09
- Re: save function, Mike Miller, 2005/03/08
- Re: save function, Mike Miller, 2005/03/08
Re: save function, Thorsten Meyer, 2005/03/09