User`s guide

4 Using MWArra y Classes
Method Description
“newInstance” on
page 4-94
Constructs a logical array with the specified
dimensions.
“newSparse” on
page 4-95
Constructs a sparse logical matrix from the supplied
full matrix.
“dispose” on page
4-98
Frees the native MATLAB array contained by this
array.
“disposeArray” on
page 4-98
Frees all native M ATLAB arrays contained in the
input object.
newInstance. This method constructs a real or complex array, specifying the
array dimensions, type, and complexity. This is a static method of the class
and thus does no t need to be invoked in reference to an instance of the class.
Note This method offers better performance than using the class constructor.
To construct a logical array with specified dimensions and all elements
initialized to
false,usethefollowing:
public static MWLogicalArray newInstance(int[] dims)
To construct a logical array with specified dimensions and initialized to the
supplied data, use the following:
public static MWLogicalArray newInstance(int[] dims,
Object data)
Input Parameters
dims
Array of nonnegative dimension sizes
data
Data to initialize the array
4-94