How to extend a curve until x-axis and y-axis
Show older comments
Hi guys! I've plotted the red curve through a set of data (.txt file of points):

How can I extend the red curve untile axes of cartesian plane ?
4 Comments
Meg Noah
on 11 Jan 2020
Please post the .txt file. The easy answer is change the limits of the axes using xlim and ylim. But I'm guessing that's not what you want. There are several ways to extrapolate data. Generally, extrapolation is frowned on in physical sciences, but it's a very small extrapolation that you're looking for.
Giuseppe
on 11 Jan 2020
Subhadeep Koley
on 14 Jan 2020
Are you expecting something like below?

Giuseppe
on 15 Jan 2020
Accepted Answer
More Answers (1)
Navya Seelam
on 15 Jan 2020
0 votes
Hi,
You can use interp1 function to interpolate your plot till x=0. There are different methods the function adopts for interpolation. You can choose from these methods to achieve appropriate interpolation. For more details on interp1 go through the link below.
Categories
Find more on Spectral Estimation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
