From: Andy A. <ad...@si...> - 2004-04-05 02:26:34
|
On Sat, 27 Mar 2004, Schloegl Alois wrote: > I'm using the latest CVS-versions of Octave and Octave-forge and observed > two problems using SPARSE matrices. > > (1) size of a sparse matrix can not be obtained, [-1,-1] is returned. I can't repeat this (with 2.1.57 and yesterday's octave-forge) octave:1> which sparse sparse is the dynamically-linked function from the file /usr/lib/octave/2.1.57/site/oct/i386-pc-linux-gnu/octave-forge/sparse.oct octave:2> x=sparse(2:31,1:30,1,31,30); octave:3> size(x) ans = 31 30 octave:4> H.x=sparse(2:31,1:30,1,31,30); octave:5> size(H.x) ans = 31 30 > (2) indexing of a sparse field within a struct stops with an error. I don't believe that this has ever worked. octave:6> H.x(2:4,:) error: can't perform indexing operations for sparse type octave:6> x(2:4,:) ans = ... I would like to try to fix (2) if possible. Could someone explain to me if dynamically loaded types need to do anything special to allow indexing in a struct? andy |