DADiSP Worksheet Functions > Function Categories > Complex Conversions > IMAGINARY
Returns the Imaginary component of a complex expression.
IMAGINARY(val)
val |
- |
A scalar, series or table. |
A scalar, series, or table.
imaginary(1)
returns the result 0.0.
imag(3.0 + 4.0i)
returns 4.0.
a = {1 + 10i, 2 + 20i, 3 + 30i, 4 + 40i};
b = imag(a);
b == {10, 20, 30, 40)
b is a series that contains the imaginary part of a.
imag(gsin(20, 0.05))
returns a series with twenty zeros because the generated sine wave contains no imaginary component.
IMAGINARY returns the imaginary part of a scalar or series as real values.
IMAGINARY can be abbreviated IMAG.