![]() |
kBuffer
1.1
|
Notice: Only enable the mean functions, if the element datatype (i.e. buffer datatype) is some sort of numeric type (i.e. integer, float, ...) To enable the buffer mean functions, you have to uncommented the following define in kBuffer.h:
There might be problems with this functions. The sum of the values (or the squared values) must be stored in a variable.
This variable is currently a long, but under certain conditions it might overflow.
You could replace it with an "unsigned long long" (or something smaller)
You can take the mean of the buffer with the function bufferMean():
You can also get the RMS (Root Mean Square), by calling the function bufferMeanRMS() (Parameters are the same)