How to calculate area under curve.
2 次查看(过去 30 天)
显示 更早的评论
So, I am trying to get an area under curve (shaded area) shown above,
Assuing the boundry is "a" and "b", how could I calculate this area under curve?
2 个评论
James Tursa
2020-4-13
If you have functions defining a and b, simply integrate a - b. How are a and b defined? Functions, or data points, or ...?
回答(2 个)
Ameer Hamza
2020-4-13
编辑:Ameer Hamza
2020-4-13
If the curve is available as datapoints, then you can use trapz(): https://www.mathworks.com/help/matlab/ref/trapz.html
For a specific example, please share the datapoints as a mat file.
4 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!