Want to take a section of a curved line between 2 points
1 view (last 30 days)
William Rose on 27 May 2021
interp1(x,y,xq,method) will interpolate in a smooth way. See the help for it here. You tell it the known x's and y's (vectors x,y) and xq, the vector of query x values - where you want to interpolate. For method, try the smooth options and see which you like: 'pchip', cubic', 'makima', or 'spline'. I like 'pchip' and 'makima' because they don't overshoot between points.
Example above: interpolation with different methods.