Filter emg 7-10-15 v1
Dependencies: HIDScope mbed MODSERIAL
Mode.cpp
- Committer:
- Bartvaart
- Date:
- 2016-10-12
- Revision:
- 24:38cd27737a43
- Parent:
- 19:6c0245063b96
File content as of revision 24:38cd27737a43:
#include "Mode.h" double mode; int Mode(double y, double ymax, double thresholdlow, double thresholdmid, double thresholdhigh) { if ( y <= thresholdlow){ mode = 1; } if (y > thresholdhigh){ mode = 3; } if (y > thresholdmid && mode == 1){ mode = 2; } return mode; }