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

1 回表示 (過去 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 件のコメント
Salah Alfiky
Salah Alfiky 2022 年 1 月 22 日
just tell me the code
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