Skip to content

iscomplex

Element-wise complex-type test.

TF = iscomplex(A)

Returns true for elements with a non-zero imaginary part. Counterpart of isreal.

iscomplex([1 2+1i 3]) % [0 1 0]
  • isreal — Element-wise real-type test.
  • real — Real part of a complex number.
  • imag — Imaginary part of a complex number.