MATLAB: How to calculate a Integral.

integral

Hello , and thanks for reading my question.
The problem is, i have a vector Error = [] , 60 values between 0 and 1 . I have another array that represents time . Time = [1,2,3…60]
I need to calculate the integral between 0 and 60 off Error(Time) dr;
How can i do this ?

Best Answer

Hi,
use the trapz function:
trapz(Time, Error)
Titus