Finding area UNDER two curves

조회 수: 21 (최근 30일)
Joyce Ai
Joyce Ai 2020년 5월 29일
댓글: Abdallah 2022년 8월 2일
I am trying to find the area under two curves that overlap in a graph.
So i only want the area under BOTH graphs that actually over lap with each other, the part shaded in pink.
So far I have only seen functions that are able to solve for the area between these two curves, but is there a way to solve for the area under the two overlapping curves?
Thanks
  댓글 수: 1
KSSV
KSSV 2020년 5월 29일
Attach your data.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2020년 5월 29일
Lets say you data is (x,y1) and (x,y2) which is of size m*2. Your curve for which you want area uses the minmum value of the two.
y = min([y1 y2]) ;
Nowy you have (x,y) data for which you want area. Use trapz, / area, / polyarea.
  댓글 수: 2
Joyce Ai
Joyce Ai 2020년 5월 29일
THANK YOU SO MUCH! This worked :)
Abdallah
Abdallah 2022년 8월 2일
NICE! thanks =)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by