问题
I want to determine the area between the red line and the blue line but only to the y-value of 4.559. How can I achieve that?
回答1:
In general:
- First you have to subtract the two functions from each other. After that, you have a function that represents the delta in y for each point on the x-axis.
- After that you have to calculate the integral, for matlab you should look here Matlab - Numerical Integral
- The last step is inserting the left, and the right bound of your desired area to calculate. The result is the area under the surface
Be careful when subtracting the functions, the result of the area might be negative (negate it in this case) if the "bigger" function is the subtrahend
来源:https://stackoverflow.com/questions/38409981/area-under-surface-between-two-curves