Main Content


Determine whether a fixed.Interval object is NaN

Since R2019b



bool = isnan(A) returns a boolean indicating whether a fixed.Interval object A is NaN.


collapse all

Create a fixed.Interval object. Use the isnan function to determine whether the Interval object is not a number.

interval = fixed.Interval({-pi,pi},{nan,1},{nan,nan});
bool = isnan(interval)
bool = 1x3 logical array

   0   1   1

The output is a logical 1 when the interval contains one or more NaN elements, and 0 otherwise.

Input Arguments

collapse all

Input fixed.Interval object, specified as a fixed.Interval object, or an array of fixed.Interval objects.

Output Arguments

collapse all

Indicates whether the fixed.Interval object A is NaN, returned as a logical value.

When A is an array of Interval objects, the output is an array of logical values of the same size as A.

Version History

Introduced in R2019b