How to perform a running integration?

조회 수: 9 (최근 30일)
Lara Severne
Lara Severne 2018년 6월 18일
답변: Walter Roberson 2018년 6월 18일
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!

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 18일
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.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by