From help-request at octave dot org Thu Jan 6 09:24:02 2005 Subject: Re: How can one get the size of a sparse matrix ? From: Andy Adler To: Schloegl Alois cc: help at octave dot org Date: Thu, 6 Jan 2005 10:25:48 -0500 (EST) On Thu, 6 Jan 2005, Schloegl Alois wrote: > I'm using Andy Adlers Sparse toolbox using Octave-forge. > > octave:10> which sparse > sparse is the dynamically-linked function from the file > /usr/local/libexec/octave/2.1.64/site/oct/i686-pc-linux-gnu/octave-forge/sparse.oct > > When I try to obtain number of rows and columns of a sparse matrix, I get always -1. > > octave:11> X = sparse(2:5,1:4,1); > octave:12> size(X), > ans = > -1 -1 This is unusual behaviour. The functions are supposed to give the right answer. I remember seeing this once, but unfortunately I don't remember what I did to produce this behaviour. It is a bug, somewhere. -- Andy Adler 1(613)562-5800x6218 ------------------------------------------------------------- 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 -------------------------------------------------------------