Debian Codegraph @

biosig4c++/mex/sumskipnan_mex.m

raw
1 % sumskipnan_mex.m is a speedier implementation of, and used by SUMSKIPNAN
2 % SUMSKIPNAN adds all non-NaN values.
3 %
4 % All NaN's are skipped; NaN's are considered as missing values.
5 % SUMSKIPNAN of NaN's only gives O; and the number of valid elements is return.
6 % SUMSKIPNAN is also the elementary function for calculating
7 % various statistics (e.g. MEAN, STD, VAR, RMS, MEANSQ, SKEWNESS,
8 % KURTOSIS, MOMENT, STATISTIC etc.) from data with missing values.
9 % SUMSKIPNAN implements the DIMENSION-argument for data with missing values.
10 % Also the second output argument return the number of valid elements (not NaNs)
11 %
12 % Y = sumskipnan(x [,DIM])
13 % [Y,N,SSQ] = sumskipnan(x [,DIM])
14 % [...] = sumskipnan(x, DIM, W)
15 %
16 % x input data
17 % DIM dimension (default: [])
18 % empty DIM sets DIM to first non singleton dimension
19 % W weight vector for weighted sum, numel(W) must fit size(x,DIM)
20 % Y resulting sum
21 % N number of valid (not missing) elements
22 % SSQ sum of squares
23 %
24 % the function FLAG_NANS_OCCURED() returns whether any value in x
25 % is a not-a-number (NaN)
26 %
27 % features:
28 % - can deal with NaN's (missing values)
29 % - implements dimension argument.
30 % - computes weighted sum
31 % - compatible with Matlab and Octave
32 %
33 % see also: FLAG_NANS_OCCURED, SUM, NANSUM, MEAN, STD, VAR, RMS, MEANSQ,
34 % SSQ, MOMENT, SKEWNESS, KURTOSIS, SEM
35
36