Effacer les filtres
Effacer les filtres

How can I calculate a Integral.

1 vue (au cours des 30 derniers jours)
Emanuel Bicho
Emanuel Bicho le 9 Juin 2015
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 ?

Réponse acceptée

Titus Edelhofer
Titus Edelhofer le 9 Juin 2015
Hi,
use the trapz function:
trapz(Time, Error)
Titus

Plus de réponses (1)

Torsten
Torsten le 9 Juin 2015
integral = error(1)/2 + sum(error(2:59)) + error(60)/2.
Best wishes
Torsten.

Catégories

En savoir plus sur Numerical Integration and Differentiation dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by