
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 matbinary format. We have no control over the Matlab file formatsand 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 formatsmakes 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 matbinary or even matascii 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 mfiles for these two functions which save the result in full matrices. If octaveforge 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
[Prev in Thread]  Current Thread  [Next in Thread] 