How to perform a running integration?
2 views (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
Walter Roberson
on 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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!