User`s guide
4 Using MWArra y Classes
isEmpty. MWCellArray inherits this method from the MWArray class.
numberOfDimensions.
MWCellArray inherits this m ethod from the
MWArray class.
numberOfElem ents.
MWCellArray inherits this method from the MWArray
class.
Methods to Get and Set Data in the MWCellArray
Use these methods to get and set values in an object of class MWCellArray.
Method Description
“get” on page
4-140
Returns the element at the specified offset as an Object.
“getCell” on
page 4-142
Returns a shared copy of theelementatthespecified
one-based offset in this array as an
MWArray instance.
“getData” on
page 4-143
Returns a one-dimensional array containing a copy of the
data in the underlying MATLAB array.
“set” on page
4-144
Replaces the element at the specified one-based offset in
this array with the specified element.
“toArray” on
page 4-146
Returns an array containing a copy of the data in the
underlying MATLAB array. The returned array has the
same dimensionality as the MATLAB array.
get. This method returns the element at t he specified one-based offset
in this array. The returned element is converted to a Java array using
default conversion rules. Calling this method is equivalent to calling
getCell(index).toArray().
The
get method of MWCellArray overrides the get method of class MWArray.
To get the element at a specific index, use one of the following:
public Object get(int index)
public Object get(int[] index)
4-140