数学建模代码汇总插值%产生原始数据x=0:0。1:1;y=(x,2-3*x+7)。*exp(-4*x)。*sin(2*x);%线性插值xx=0:0。01:1;y1=interp1(x,y,xx,'linear');subplot(2,2,1)plot(x,y,'o',xx,y1);title('线性插值');%最邻近点插值y2=interp1(x,y,xx,'nearest');subplot(2,2,2)plot(x,y,'o',xx,y2);title('最邻近点插值');%三次插值y3=interp1(x,y,xx,'cub...