WYRDTEK Home Features Reference Downloads About


Reference/es_sc_addmeanstd

Syntax


int es_sc_addmeanstd( struct es_sc *scalc, double val );

Arguments

struct es_sc *scalc Statistics calculator.
double val Data-point value to be added.

Description

Add data-point (val) to dataset, for purposes of computing both mean and standard deviation (including variance). Use es_sc_addmean() instead to compute mean only.

Mean and standard deviation are computed incrementally so the user must choose either es_sc_addmean() or es_sc_addmeanstd() for specifying all data-points in a dataset.

Returns the number of data-points in the dataset after val has been added. This number never exceeds the "window" size used to construct the calculator (see es_sc_new()).

[Back To Reference] [Back To Reference/es_sc]