How to calculate area of space in Matalb
2 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/197518/image.png)
Dear members, I want to calculate area of space created by 4 lines as figure. Could you help me to do that ? Thank you
4 件のコメント
採用された回答
Image Analyst
2018 年 10 月 11 日
Try stacking the numerical row vectors of the curves vertically using a semicolon then use min() to get the lower-most curve:
bottomCurve = min([curve1; curve2; curve3; curve4; curve5; curve6], 1);
Then sum from the left index to the right index, whatever they are.
areaUnderCurve = sum(bottomCurve(index1 : index2))
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!