How to calculate the area of specific path under the curve?
조회 수: 2 (최근 30일)
이전 댓글 표시
![Area wanted to calculate](https://www.mathworks.com/matlabcentral/answers/uploaded_files/869935/Area%20wanted%20to%20calculate.png)
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!