How to calculate the area of specific path under the curve?

조회 수: 3 (최근 30일)
Salah Alfiky
Salah Alfiky 2022년 1월 22일
답변: Louis Alexander 2022년 1월 22일
Area wanted to calculate
this is the area i want to calculate
the code i used
>> i=[0:0.5:3.5];
>> l=18*sqrt(i);
>> plot (i,l)
>> grid on
>>

답변 (2개)

KSSV
KSSV 2022년 1월 22일
Read about trapz.
  댓글 수: 2
Louis Alexander
Louis Alexander 2022년 1월 22일
like this:
i=[0:0.5:3.5];
l=18*sqrt(i);
plot (i,l)
grid on
Q = cumtrapz(l,i)
Q = trapz(l,i)

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


Louis Alexander
Louis Alexander 2022년 1월 22일
if your curve can be expressed as a function, you can choose
integralintegral2 or integral3

Community Treasure Hunt

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

Start Hunting!

Translated by