How to calculate the area of specific path under the curve?
1 次查看(过去 30 天)
显示 更早的评论
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
>>
0 个评论
回答(2 个)
KSSV
2022-1-22
Read about trapz.
2 个评论
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
2022-1-22
if your curve can be expressed as a function, you can choose
integral、integral2 or integral3
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!