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)

Answers (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.

Asked:

on 10 Jun 2018

Answered:

on 10 Jun 2018

Community Treasure Hunt

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

Start Hunting!