hack gt final code
Dependencies: 4DGL-uLCD-SE BMP085 PinDetect SDFileSystem mbed wave_player
Diff: statistics.h
- Revision:
- 12:b301cb3cef44
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/statistics.h Sun Sep 21 11:05:21 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" + +class RunningStatistics { + public: + + RunningStatistics(int numSamples); + double addSample(double newSample); + double getAverage(); + double getStandardDeviation(); + void reset(); + int getCount(); + double getSum(); + + double sum; + double sumSquares; + double average; + double *samples; + + int sampleSize; + int currentNdx; + int count; +}; \ No newline at end of file