Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HIDScope MODSERIAL QEI TextLCD mbed
Fork of TotalControlEmg2 by
Meanvalue.cpp
- Committer:
- Bartvaart
- Date:
- 2015-10-07
- Revision:
- 9:1655d67d8a53
- Parent:
- 5:b400209df739
- Child:
- 10:897db0bdb2fe
File content as of revision 9:1655d67d8a53:
#include "Meanvalue.h"
//gemiddelde bepalen
double Meanvalue(double y, double &sum, double &ymean, int &a, int delay){
sum = sum + y;
a = a + 1;
if (a == delay)
{
double ymean = sum / a;
sum = 0;
a = 0;
return ymean;
}
else{
return ymean;
}
}
//double Meansmooth(double y, double &sum, int &a, double &ymean, int delay){
// }
