MATLAB: How to extend a curve until x-axis and y-axis

curve fittingMATLABplot

Hi guys! I've plotted the red curve through a set of data (.txt file of points):
AVL_fitting.png
How can I extend the red curve untile axes of cartesian plane ?

Best Answer

It doesnt seem to happen with interpolation(interp1)...atleast for me. But i've come up with an alternative based on the geometry and i've explained the reason along the code. Hope this helpsuntitled.jpg