User`s guide

4 Using MWArra y Classes
When run, the example displays this output:
A=123456
7 8 9101112
13 14 15 16 17 18
newSparse. This method constructs a real or complex sparse
MWNumericArray, with the specified num ber of rows and columns and
maximum nonze ro elem ents, and initializes the array with the supplied data.
This is a static method of the class and thus does not need to be invoked in
reference to an i nstance of the class.
Constructing a Sparse Matrix with No Nonzero Elements
To construct a sparse matrix with no nonzero elements, use
newSparse(int rows, int cols, int nzmax, MWClassID classid,
MWComplexity cmplx)
Constructing a Sparse Matrix of Real Numbers
To construct a real sparse array from an existing nonsparse two-dimensional
array, use
newSparse(Object realData, MWClassID classid)
To construct and initialize a new real sparse array, use
newSparse(int[] rowindex, int[] colindex, Object realData,
MWClassID classid)
To construct an d in i t ialize a new real sparse array, specifyi ng it s dimensions.
use
newSparse(int[] rowindex, int[] colindex, Object realData,
int rows, int cols, MWClassID classid)
To construct and initialize a new real s pa r se a rray, spe c if yi ng its dimensions
and maximum number of nonzeros, use
4-66