iscomplexΒΆ

iscomplex checks if its argument is a complex scalar or complex matrix.

bool = iscomplex(m)

Return Value

bool is TRUE (1), if the argument is a complex scalar or complex matrix and FALSE (0), if the argument is of another type.

Parameters

m

m is a scalar, matrix or function.

Example

a = 1 + 3i
iscomplex(a)
     1.0000
iscomplex(sin)
     0.0000
iscomplex(1.12)
     0.0000

id-332019