How to perform a running integration?

2 Ansichten (letzte 30 Tage)
Lara Severne
Lara Severne am 18 Jun. 2018
Beantwortet: Walter Roberson am 18 Jun. 2018
I have a total of 2.5 million data points. It is a voltage created from an accelerometer. I have been asked to perform running integration on this data, taking say the first 10 points and integrating these to output one number, and then take the next 10 points and integrate and so on. I have been asked to do this perform another running integration for the output of the first.
Is there a simple way to code this into matlab? The data is taken in time intervals but is not a set function - its mapping the squat of a knee.
Thanks in advance!

Antworten (1)

Walter Roberson
Walter Roberson am 18 Jun. 2018
trapz( reshape(data, 10, []) )
if the data might not be an exact multiple of 10 long, then I recommend using buffer() from the Communications System toolbox.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by