x=0:2:4*pi;
y=sin(x).*exp(-x/5);
xx=0:0.1:4*pi;
yya=interp1(x,y,xx,'nearest');
yyb=interp1(x,y,xx,'linear');
yyc=interp1(x,y,xx,'spline');
yyd=interp1(x,y,xx,'cubic');
yye=polyval(polyfit(x,y,6),x);
plot(xx,yya,xx,yyb,xx,yyd,x,y,'r*');
legend('nearest','linear','spline','cubic','source');
grid on
title('2007***07**.zhang')