To interpolate between two lines in MATLAB, you can use the interp1
function. This function interpolates a set of data points (in this case, the points along the two lines) to a new set of query points.
Here's an example of how to use interp1
to interpolate between two lines:
main.m493 chars20 lines
Note that this example simply takes the average of the two sets of y values to get the interpolated line. Depending on your application, you may need to use a different method (such as extrapolation) to get the desired interpolation results.
gistlibby LogSnag