Rafael Laboissiere wrote:
package octave-forge tags 295395 upstream forwarded 295395 [EMAIL PROTECTED] thanks
----- Forwarded message from Dennis Jørgensen <[EMAIL PROTECTED]> -----
From: Dennis Jørgensen <[EMAIL PROTECTED]> Subject: octave-forge: Replacing a submatrix of a sparse matrix results in a full matrix Date: Tue, 15 Feb 2005 16:28:50 +0100 To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Package: octave-forge Version: 2004.11.16-3 Severity: normal
With the following commands, I would have expected matrix A to stay sparse:
octave:1> A = sparse(4,4); octave:2> A([1 2 4],[1 2 4]) = sprand(3,3,0.2); octave:3> issparse(A) ans = 0
Same commands in Matlab:
A = sparse(4,4); A([1 2 4],[1 2 4]) = sprand(3,3,0.2);
issparse(A)
ans =
1
Replacing sprand() with something returning a full matrix yields the same results: sparse 'A' in Matlab, full in Octave.
Regards,
Dennis J??rgensen
Yes, I know. This is what made me start writing the sparse matrix patch that is currently in the unstable CVS of octave. I started to write a patch to the assign functions for the sparse matrix code and quickly found myself with 2,000 lines of code, and felt if I was going to do that, that I might as well replace the whole thing. The good news is as this was the problem that made me start writing this code, the assign behaviour of the sparse matrices in the unstable octave CVS work as you would expect.... Downside, is that I don't expect a patch for the octave-forge version of the sparse matrix code, as it is completely superseded by the version in octave itself..
D.