4 Using MWArra y Classes
The specified index parameter is invalid.
ArrayStoreException
Incompatible array type or invalid array data
Example — Constructing a Sparse Logical Array Object
Create a sparse array of logical values using the newSparse method:
boolean[] Adata = {true, true, false, false, true};
int[] ri = {1, 1, 1, 1, 1};
int[] ci = {1, 2, 3, 4, 5};
MWLogicalArray A = MWLogicalArray.newSparse(ri, ci, Adata);
System.out.println(A.toString());
When run, the example displays this output:
(1,1) 1
(1,2) 1
(1,5) 1
dispose. MWLogicalArray inherits this m ethod from the MWArray class.
disposeArray.
MWLogicalArray inherits this method from the MWArray
class.
Methods to Return Information About an MWLogicalArray
Use these methods to return information about an object of class
MWLogicalArray.
Method Description
“classID” on page 4-99 Returns the MATLAB type of this array.
4-98
Komentarze do niniejszej Instrukcji