From: Schloegl A. <alo...@tu...> - 2004-03-27 10:26:08
|
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. (2) indexing of a sparse field within a struct stops with an error. Issue (1) was working well in Octave4Windows 2.1.50. Obviously, it broke at some time Repeat-By: --------- octave:1> which sparse sparse is the dynamically-linked function from the file /usr/local/libexec/octave/2.1.57/site/oct/i686-pc-linux-gnu/octave-forge/sparse.oct octave:2> x=sparse(2:31,1:30,1,31,30); octave:3> size(x) ans = -1 -1 octave:4> H.x=sparse(2:31,1:30,1,31,30); octave:5> size(H.x) ans = -1 -1 octave:6> x(2:4,:) % Here, indexing works well ans = Compressed Column Sparse (rows=3, cols=30, nnz=3) (1 , 1) -> 1 (2 , 2) -> 1 (3 , 3) -> 1 octave:7> H.x(2:4,:) % Here, indexing does not work error: can't perform indexing operations for sparse type octave:7> |