Calculating an area under a curve
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
% Dear users,
% Is there any way to calculate an area under a curve as in the figure?
% It would really appreciate if you can help me.
% Thanks in advance!
7 commentaires
Torsten
le 13 Mar 2019
The formula is gives an approximation for
integral_{t=0.2}^{t=t(end)} u(t) dt.
It seems that you want the area start at u=0.2.
Then subtract the area of the rectangle between u=0 and u=0.2 for 0.2 <= t <= t(end), i.e.
area = trapz(tp,up) - (tp(end)-0.2)*0.2
Réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!