Next: , Previous: , Up: API Alphabetically   [Contents]


8.2.24 isnanny

Function: out = isnanny (X)

Test if elements are NaN or NaN-like

Tests if input elements are NaN, NaT, or otherwise NaN-like. This is true if isnan() or isnat() returns true, and is false for types that do not support isnan() or isnat().

This function only exists because:

  1. Matlab decided to call their NaN values for datetime “NaT” instead, and test for them with a different “isnat()” function, and
  2. isnan() errors out for some types that do not support isnan(), like cells.

isnanny() smooths over those differences so you can call it polymorphically on any input type.

Under normal operation, isnanny() should not throw an error for any type or value of input.

See also: isnan, isnat, ismissing, eqn, isequaln