octave-maintainers
[Top][All Lists]
Advanced

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

Re: Help with [] for defined types


From: Paul Kienzle
Subject: Re: Help with [] for defined types
Date: Tue, 27 Jul 2004 19:42:28 -0400


On Jul 27, 2004, at 6:57 PM, David Bateman wrote:

QUESTION 3
----------

The load_binary and save_binary functions are for the octave binary
format (i.e. save -binary ) and have nothing to do with the
-mat-binary format. We have no control over the Matlab file formats
and so there is no way to extend them and thus splitting their functioning into the octave_value as was done for the ascii, binary and hdf5 formats
makes less sense. This might be done however, with new save_mat_ascii,
save_mat4_binary and save_mat5_binary methods of the octave_value class.
But my feeling is that is pretty ugly.

So unfortunately as it stands unless sparse actually goes into octave
you'll have difficulties using the -mat-binary or even -mat-ascii
formats.  You should be able to use an HDF5 format to exchange data
with matlab however.

I've considered adding sparse support to mex by calling the
functions "spfind" to get the matrix out of the octave value and
"sparse" to put the matrix back into a sparse value.  You could
do something similar in load/save for the matlab binary type.
Until octave has a sparse type of its own it can include fake
sparse m-files for these two functions which save the result
in full matrices.  If octave-forge is present, then it will pick up
Andy's version of the functions.  I guess you will also need
"issparse" to detect whether the matrix type is a sparse matrix
before storing it.

- Paul



reply via email to

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