Functions > Data Analysis > Outliers and NaN > NaN Detection and Removal
NaN Detection and Removal
The NaN (Not a Number) functions can be used to fill in empty matrix elements, or to delete outlier values from data sets.
markNaN(M, vindex)—Changes each element in data specified by vindex to contain a NaN.
matchNaN(M)—Returns the index or pair of indices of the NaN entries in data.
filterNaN(M)—Removes the rows of the data set, M, that contain a NaN.
Using filterNaN is equivalent to using matchNaN followed by the trim function, but concatenates them into one step.
IsNaN(x)—Detects the presence of the built-in constant NaN in array elements.
Arguments
M is a complex vector or matrix.
vindex is a vector of indices given either as integers or nested 2 x 1 matrices, specifying elements in M.
x
is an array element.
Was this helpful?