<< flag_impl_significance utility functions flag_nans_occured >>

NaN Toolbox >> NaN Toolbox > utility functions > flag_impl_skip_nan

flag_impl_skip_nan

sets and gets default mode for handling NaNs

Calling Sequence

FLAG = flag_impl_skip_nan()
flag_impl_skip_nan(FLAG)
prevFLAG = flag_impl_skip_nan(nextFLAG)

Parameters

FLAG:

gets current mode

1 :

skips NaN's (the default mode if no mode is set)

0:

NaNs are propagated; input NaN's give NaN's at the output

Description

prevFLAG = flag_impl_skip_nan(nextFLAG) gets previous set FLAG and sets FLAG for the future

flag_impl_skip_nan(prevFLAG) resets FLAG to previous mode

It is used in: sumskipnan, median, quantiles, trimean and affects many other functions like: center, kurtosis, mad, mean, moment, rms, sem, skewness, statistic, std, var, zscore etc.

The mode is stored in the global variable FLAG_impl_skip_nan It is recommended to use flag_impl_skip_nan(1) as default and flag_impl_skip_nan(0) should be used for exceptional cases only. This feature might disappear without further notice, so you should really not rely on it.

Authors


<< flag_impl_significance utility functions flag_nans_occured >>