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-06
- Revision:
- 4:3b9e2d49d5fb
- Child:
- 5:b400209df739
File content as of revision 4:3b9e2d49d5fb:
#include "Meanvalue.h"
double sum = 0;
int a = 0;
double Meanvalue(double y){
double sum = sum + y;
int a = a + 1;
if a == 10
{
ymean = sum / a;
sum = 0;
a = 0;
return ymean;
}
else{
return 0;
}
}
