help-octave
[Top][All Lists]
Advanced

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

Re: save function


From: John W. Eaton
Subject: Re: save function
Date: Wed, 9 Mar 2005 13:28:22 -0500

On  9-Mar-2005, David Bateman <address@hidden> wrote:

| As I had a hand in implementing the code as it now stands, let me give 
| some feedback. There are  two basic parts of the load/save functions. 
| The generic part, that is responsible for generating the headers upto 
| the "# type:" line and specific load/save functions for each type. 

| Gettting rid of the headers could be done for the save functions, 
| however the choice of which specific version of the load function that 
| are part of the octave_value is called is determined by the "# type:" name.

Yes, I think everyone recognizes that Matlab's -ascii format is
useless as a way to save data for reading later, unless you are saving
a single numeric matrix to a file that is named after the variable.
In that case, Octave (and Matlab) can read the data and create a
variable name for it based on the name of the file.

I don't think anyone is proposing to do away with any functionality.
So we would keep the ability to save variables in ascii format with
header info so that the saved data can be reloaded, but the option for
the save function that would produce that behavior would be something
other than "-ascii"

The question is whether we should make -ascii behave in a compatible
way.  As I see it, the answer is probably yes, because that is what
people expect.  If we don't do this, we will just see more questions
like the ones posted recently, because Octave offers a -ascii option
but it doesn't do what Matlab users expect.

| Frankly the matlab behaviour is brain-dead.

No argument there.

| 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.

If we are going to provide compatible behavior, I think it should use
the same option name as is used by Matlab.  Otherwise, we will
continue to see questions about why -ascii doesn't do the expected
thing.

jwe



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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