>> t=0:0.12:1;y=t.^2*exp(-5*t).*sin(t); >> t1=0:0.02:1;y0=t1.^2.*exp(-5*t1).*sin(t1);y1=interp1(t,y,t1,‘spline‘); >> plot(t1,y1,‘:‘,t,y,‘o‘,t1,y0)
《高等应用数学问题的MATLAB求解》——第8章习题代码
原文:https://www.cnblogs.com/Math-Nav/p/13375263.html