Area integration with the point where the mouse selected

2 次查看(过去 30 天)
I would like to integrate the area under the the curve and hope to chose the area manually. I have attached a sample figure. Thank you!

回答(2 个)

Benjamin Kraus
Benjamin Kraus 2022-10-21
You can use ginput to click and select points from a figure window.
Once you've got the points, "integrating the area under the curve" is just a matter of adding the values and dividing by the space between values.

Kevin Holly
Kevin Holly 2022-10-28
You could also use a slider and some buttons in an app to select the area of interest. See App attached.

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by