function imag

Returns the imaginary part of the complex number X. If X is not a complex number, 0 is returned.

Syntax
result = imag(X)

Arguments
X:   The value whose imaginary part is to be returned. This can be a number (integer, real, complex) or a matrix. If X is a matrix, a matrix of the same size is returned where each element represents the result of the operation.


See also
function real
function arg
function abs
function complex
function conj