The Octave Forge package repository is no longer actively maintained. Please find Octave Packages at https://packages.octave.org.

Navigation

Operators and Keywords

Function List:

C++ API

Function File: [x, y, …] = removeExtraNanSeparators (x, y, …)

Remove groups of NaN and leave a single separator.

For any number of vectors, x, y, z, …, reduce groups of contiguous NaNs into a single NaN separator. The vectors must all have the same dimensions and the NaNs must be locations. Leading NaNs are removed, and trailing NaNs are reduced to one.

removeExtraNanSeparators ([NaN NaN 3 4 5 NaN NaN 8 NaN], [NaN NaN 7 6 5 NaN NaN 2 NaN])
⇒
[3 4 5 NaN 8 NaN]
⇒
[7 6 5 NaN 2 NaN]

See also: diff, isnan, isna.

Package: mapping