User`s guide
4 Using MWArra y Classes
Method Usage
setImag(int, type)
Replaces the imaginary part of the element
at the one-based index with the supplied
value
setImag(int[], type)
Replaces the imaginary part of the element
attheone-basedindexarraywiththe
supplied value
In these m ethod calls, ty pe represents one of the following supported Java
types of
MWNumericArray:
•
double
• float
• byte
• short
• int
• long
• Boolean
• Subclass of java.lang.Number
• Subclass of java.lang.String
• Subclass of java.lang.Boolean
The get and set methods access a single element at a specified index. An
index is passed to these accessor methods in the form o f a single offset or
as an array of indices.
Note All indexing is one-based, which is the MATLAB convention, as
opposed to zero-based, which is the Java convention.
4-18