isreal
Element-wise real-type test.
Syntax
Section titled “Syntax”TF = isreal(A)Description
Section titled “Description”Returns true for elements with no imaginary part (or imaginary part exactly zero). Counterpart of iscomplex.
Note: a value with imaginary part 0+0i is technically complex-typed but isreal returns true for it. Use iscomplex for a strict type check.
Example
Section titled “Example”isreal([1 2+1i 3]) % [1 0 1]