using the spare storage option for matrix

I have defined a sparse matrix and verified that it is space by using the command- sparsematrixplot(Kd,'matrixview');

first, is there another way to check wether the matrix is stored in the sparse form?

second, when trying to sovle an algebraic set of equation using the procedures for hendling the sparse matrix i encountered the following error:

Error, (in HWcall[1]) column vector dimension less than length of sparse data
 

what is the meaning of this error and how can I repair it?

Dvir
 

 

MatrixOptions

There is a command to show the underlying storage of a Matrix.

> M := Matrix(100,100,'storage'='sparse'):

> MatrixOptions(M,'storage');
                                    sparse

There are also ways to see the exact number of stored entries.

> N := Matrix(100,100):

> rtable_num_elems(N,'Stored');
                                     10000
 
> M := Matrix(100,100,'storage'='sparse'):

> rtable_num_elems(M,'Stored');
                                       0

> M[3,3]:=1.0:
> rtable_num_elems(M,'Stored');
                                       1

That error message with HWcall[1] looks like a bug. You could report it. If you post it then someone might suggest a workaround.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}