checks whether the last call(s) to sumskipnan or covm
[flag]=flag_nans_occured()
checks whether the last call(s) to sumskipnan or covm contained any not-a-numbers in the input argument. Because many other functions like mean, std, etc. are also using sumskipnan, also these functions can be checked for NaN's in the input data.
A call to FLAG_NANS_OCCURED() resets also the flag whether NaN's occured. Only sumskipnan or covm can set the flag again.