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 件)
David Goodmanson
2018 年 6 月 10 日
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 で 2-D and 3-D Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!