How to linear extrapolate?

21 次查看(过去 30 天)
Hi,
I have a set of x and y data as shown in image. I am looking to find the y-intercept (i.e, when x=0) that is outside the range of data. My graph is roughly linear, in fact, towards the left it is linear. What is the best approach to extrapolate this plot to x=0?
(Edit: plot on the right is the one to be extrapolated) Thanks in advance.

采纳的回答

Star Strider
Star Strider 2015-1-24
You haven’t uploaded your image yet. That and a .mat file of your data would help.
It is generally not advisable to extrapolate beyond the region of fit. You have no idea what your data are beyond what you have.
However, if you know the process that produced your data and you have a good mathematical model of it that you know extends to x=0, you can estimate it at x=0.
  2 个评论
Amar
Amar 2015-1-26
Sorry about the image, it is now inserted. As you can see i can pretty much predict that the plot is linear, I am just confused as of how to implement this extrapolation
Star Strider
Star Strider 2015-1-26
The plot on the left seems to have an established y-intercept at 1 (log10(1) = 0).
If you must extrapolate, for the plot on the right, I would regress x less than x=4 (log10(4)=0.6), and y less than y=1.5E-15 (log10(1.5E-15)=-14.8), using polyfit and taking log10 of both x and y:
B = polyfit(log10(x), log10(y), 1)
The output will yield ‘B(1)’ as the slope, and ‘B(2)’ as the intercept, in the context of:
log10(y) = B(1)*log10(x) + B(2)
y = 10^B(2) * x^B(1)
if my maths are correct (late evening here).
I again caution about the inherent uncertainty of extrapolating beyond your available data. That it appears linear in the left-most region of the plot does not in any way suggest that it actually is linear from x=1 (the y-intercept on the log-log plot), to x=2, where your data end. The ‘linearity’ you see could simply be an artifact of the log-log plot itself.

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by