Area between two curves that intersect
Mostra commenti meno recenti

Hi, i'm trying to find the area between these two plots, i need to find the area of each individual section where the plots overlap. For some reason my 'trapz' commands aren't working. All help would be appreciated. If more info is needed about the program just let me know and i'll see what i can do.
lprofile=xlsread(fname_lprofile);
x1=lprofile(:,1)
y1=lprofile(:,2)
y2=lprofile(:,3)
plot(x1,y1,x1,y2)
x3=2
ex_area=0
fl_area=0
while x3>1 & x3<(n1-1)
if lprofile(x3,2)>lprofile(x3,3)
a1=trapz (lprofile(x3,1),lprofile(x3,2),2)
ex_area=ex_area+a1
x3=x3+1
elseif lprofile(x3,3)>lprofile(x3,2)
a2=trapz(x3,3)
fl_area=fl_area+a2
x3=x3+1
else
x3=x3+1
end
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Numerical Integration and Differentiation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!