isreal

Determines if x is a real number.

Syntax

R = isreal(x)

Inputs

x
Any valid scalar | string | vector | matrix.
Type: double | integer | char | string | logical | struct | cell
Dimension: scalar | string | vector | matrix

Outputs

R
Boolean value true or false.

Examples

Simple input:

R = isreal(2)
R = 1

Matrix input:

R = isreal([2i 3;4 6])
R = 0