[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: saving sparse variables
From: |
Andy Adler |
Subject: |
Re: saving sparse variables |
Date: |
Mon, 17 May 2004 13:21:12 -0400 (EDT) |
On Mon, 17 May 2004, Robert Kirchner wrote:
> I'm now having trouble saving a sparse variable. I get the error
> "octave_base_value::save_ascii(): wrong type argument `sparse'". Same
> thing, mutatis mutandis, when I try to save -binary. Is there a
> workaround?
Saving sparse directy is not implemented. Octave does not currently
provide the required hooks.
Try this:
SAVING:
[spvar.i, spvar.j, spvar.v, spvar.nr, spvar.nc]= spfind(spvar);
save('-binary', file,'spvar');
LOADING:
load(file);
spvar= sparse( spvar.i, spvar.j, spvar.v, spvar.nr, spvar.nc );
Andy
-------------------------------------------------------------
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
-------------------------------------------------------------