MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / stddev

Function stddev

src/data_handler/inc/common_data_handler_helpers.h:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26inline double stddev (double data[], int len)
27{
28 double the_mean = mean (data, len);
29 double deviation = 0.0;
30
31 for (int i = 0; i < len; ++i)
32 {
33 deviation += pow (data[i] - the_mean, 2);
34 }
35
36 return sqrt (deviation / len);
37}
38
39
40// Reverses the drection of an array of doubles.

Callers 1

detect_peaks_z_scoreFunction · 0.85

Calls 1

meanFunction · 0.85

Tested by

no test coverage detected