How to extend the graph from a limited range of data to the axis

Hello,
I have the following graph:
And I would like to make it so that it intersects the y-axis, following the trend of the given datapoints.
Thanks for the help.

6 Comments

You have to use extrapolation after polyfit, but the values obtained are not assured to be correct.
I have used interp1() and spline to get this curve, if I use poolyfit it doesn't give a nice smooth curve @KSSV.
interp1 has an option of extrapolation; read the doc.
@KSSV I have tried the extrap option for interp1() however, it doesn't follow the trend of the curve and just starts to decrease rapidly. Thanks
I already mentioned.... it is an extrapolation..you need to be careful.
Ok, how can extrapolation be used for polyfit as you mentioned initially @KSSV? I would like to compare the results and see which one is more accurate. Thanks

Sign in to comment.

Answers (1)

Hello,
To extrapolate a curve, you need to have any 2 of the following:
  • The equation of the curve itself (using which the plot of the curve can be made)
  • The degree of the equation of the curve, If you know the degree of the equation of the curve, you can use polynomial fitting to find the approximate equation of the curve.
Hope it helps

Tags

Asked:

Tb
on 11 Feb 2021

Answered:

on 21 Feb 2021

Community Treasure Hunt

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

Start Hunting!