I'd like to use the interp1 function to (linearly) interpolate between sample points. For uniform interpolation between sample points, I can use
test = [-1 -2 0 3];
new = interp1(test,1:.5:numel(test));
which will give an interpolated series, where the new series now includes one additional interpolated point between each of the original (test) series points.
What I would like to do is, create a new series that interpolates depending upon the differences between test series points. For the case above, the resulting output would look like
[-1 -2 -1 0 1 2 3];
I've worked through the examples at http://au.mathworks.com/help/matlab/ref/interp1.html, but the answer still eludes me. I'd appreciate a little direction for this simple query.
min(test):max(test)? - Luis Mendointerp1solution can use any interpolation method, e.g. cubic - hbaderts