isnan - check for "Not a Number" entries
isnan(x) returns a boolean vector or matrix which contains true entries corresponding with "Not a Number" x entries and false entries corresponding with regular x entries.
isnan([1 0.01 -%nan %inf-%inf])