Need to find the area between two functions
Afficher commentaires plus anciens
I've got the following code, Y is a numeric matrix. Using the trapz function I've been able to find the area under the curve. Is it possible to find the area under the curve above Y=0.8 and between X=-0.03 and 0.03. the graph is a bell shaped curve for reference
x = [1:9996];
y = [B1];
plot(x, y);
trapz(x,y)
3 commentaires
HighPhi
le 10 Fév 2022
what is your B1? I may be able to help you if I knew what was inside y.
Kano Lewis
le 10 Fév 2022
Kano Lewis
le 10 Fév 2022
Réponse acceptée
Plus de réponses (1)
yanqi liu
le 11 Fév 2022
x = [1:9996];
y = [B1];
ind = y < 0.8;
x(ind) = [];
y(ind) = [];
plot(x, y);
trapz(x,y)
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!