Finding the area under a semilogy plot with straight line segments

I am trying to find out the area under a plot, the x-axis of which is in linear scale and y-axis in log scale. A sample plot is attached. The data points are given below. Any suggestions?
(100,0.01),(200,1),(500,1),(1000,0.5),(2000,0.5)

답변 (1개)

Hi Arun,
You have four intervals, each defined by start and end points (x1,y1) and (x2,y2). In each interval, y is of the form y = C*exp(a*x) for some C and a, and the integral is
I = (x2-x1)*(y2-y1)/(log(y2)-log(y1))
where the logs are natural log. If you would rather use log10, then
I = (x2-x1)*(y2-y1)*log10(exp(1))/(log10(y2)-log10(y1)) .
In the two intervals where y = const, then these expressions collapse into the obvious result
I = (x2-x1)*y2
and of course the final result is the sum for all four intervals.

카테고리

도움말 센터File Exchange에서 Log Plots에 대해 자세히 알아보기

질문:

2018년 6월 10일

답변:

2018년 6월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by