MATLAB: Interpolation of unequally spaced data

linear interpolation

I have a small set of (x,y) data points which are not evenly spaced. I want to interpolate the data for some analysis work.With very few points I am unable to work out.I cant use interp1 for the data is not evenly spaced.ANY SUGGESTIONS ?
3425.0 12.5 825.0 25 200 37.5 75 50 25 62.5 12.5 75

Best Answer

Your data do not have to be evenly spaced to use interp1.
For example:
x = sort(unique(randi(50,1,10)));
y = randi(10,1,length(x));
xi = linspace(0,max(x),15);
yi = interp1(x,y,xi,'linear');
figure(1)
plot(x,y,'-*b')
hold on
plot(xi,yi,'pr')
hold off
grid
legend('Original','Interpolated')