IMAGINARY Function
Returns the imaginary part of a complex number.
enabled.
Usage
Input Parameters
complex_expr—A single or double-precision complex number (one with both a real and imaginary part). Can be of any dimension.
Returned Value
result—The imaginary part as a single or double-precision floating-point value. It is of the same dimension as complex_expr.
Keywords
None.
Discussion
If the input parameter, complex_expr, is single-precision complex, the result is single-precision. If complex_expr is double-precision complex, the result is double-precision.
IMAGINARY can be used for a variety of applications—one example is using it to find the phase angle of a complex result, such as a filter, by dividing the arctangent of the imaginary part by the real part.
Example
x = COMPLEX(0, 2) PRINT, IMAGINARY(x) ; PV-WAVE prints: 2.00000