COMPLEX

Purpose:

Combines two input expressions into complex Cartesian (Real/Imaginary) form.

Syntax:

COMPLEX(val1, val2)

val1

-

A scalar, series or table.

val2

-

A scalar, series or table.

Returns:

Complex scalar, series, or table in Real/Imaginary form.

Example:

complex(1, 2)

 

returns the scalar 1 + 2i.

Example:

complex(1)

 

returns the scalar 1 + 0i.

Example:

complex(1..5, 2)

 

returns the complex series {1+2i, 2+2i, 3+2i, 4+2i, 5+2i}.

Example:

complex(W1, W2)

 

is equivalent to W1 + W2*i for W1 and W2 real series.

Remarks:

Returns a complex value regardless of the input value. If at least one of the input arguments is a series, COMPLEX returns a complex series.

 

complex(a, b) is equivalent to a + b*i.

 

For complex inputs, complex(a, b) is equivalent to:

real(a) + real(b)*i.

See Also:

CARTESIAN

CASTCOMPLEX

CONJUGATE

IMAGINARY

ISCOMPLEX

MAKECARTESIAN

MAKEPOLAR

PHASE

POLAR

REAL