Routines (alphabetical) > Routines: I > IMAGINARY

# IMAGINARY

The IMAGINARY function returns the imaginary part of its complex-valued argument.

## Examples

; Create an array of complex values:
C = COMPLEX([1,2,3],[4,5,6])
; Print just the imaginary parts of each element in C:
PRINT, IMAGINARY(C)

IDL prints:

4.00000 5.00000 6.00000

## Syntax

Result = IMAGINARY(Complex_Expression)

## Return Value

If the complex-valued argument is double-precision, the result will be double-precision, otherwise the result will be single-precision floating-point.

## Arguments

### Complex_Expression

The complex-valued expression for which the imaginary part is desired.

## Keywords

### Thread Pool Keywords

This routine is written to make use of IDL’s thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.

## Version History

Original | Introduced

## See Also

COMPLEX, DCOMPLEX, REAL_PART