## Digital integrator in C

Started by 2 years ago2 replieslatest reply 2 years ago370 views

Hello,

I am going to implement a digital integrator in C. I have decided to use trapezoidal rule in recurrent form i.e. to use following formula

$$I(k) = I(k-1) + \frac{T}{2}\cdot [x(k-1) + x(k)]$$,

where $$T$$ is the period of execution. Please can anybody tell me whether this formula is good choice or any other better ways how to calculate an integral exist? Thanks in advance for any ideas.

#C

[ - ]