MATLAB BUILDER JA 2 User's Guide Page 174

  • Download
  • Add to my manuals
  • Print
  • Page
    / 292
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 173
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
Page view 173
1 2 ... 169 170 171 172 173 174 175 176 177 178 179 ... 291 292

Comments to this Manuals

No comments