04-04-2022 07:31 AM
Hello
I want to calculate the mean after 2 seconds when the graph basically increments. I do not want to calculate the whole mean of the graph, only when it increases.
Thanks
KJ
04-04-2022 09:10 AM
Store 2 seconds worth of the data and then perform the mean on that data.
We need a lot more context (ie code) to make any more detailed recommendations.
04-04-2022 11:45 AM
Typically you would just keep the sum in a shift register and divide by the count after each interval. No need to accumulate arrays. There is even a "mean ptbypt" that you could read and reset as required.
It would be so much easier for all of us if you would attach some simplified code. Thanks!