- #1

- 17

- 0

Secondly this is the equation they used:

y(n) = y(n-1) + (1/(2fs))*(x(x-1)+x(n)) , where n>0

so I guess fs is my sampling frequency which would be 25 and x is my integrand. I would assume n is my value so 1 or 2 or 3rd sample but I'm worried about y(n-1) and the x(n) part since the start of the equation is y(n).

Basically if say my values were

Fs=25

n=1

x= 32

then is it right to say

y(n) = y(1-1) + (1/(2*25))*(32(32-1)+32(1))

or is the y(n-1) similar to the y(n) part and I have to sort of work out the integration together?

Also with my second sample do I just add it to my first? Apologies about this, my maths isn't the best.

Lastly is the equation I wrote make sense? I tried looking up similar trapezoidal equations and the look similar to me.