y=dsolve('D3y=D2y-Dy-y+t^2','y(0)=0','Dy(0)=1','D2y(0)=-1');
tt=linspace(0,10,1001); %表示t从0到10
for i=1:1001
t=tt(i);
yy(i)=eval(y);
end
plot(tt,yy)
y=dsolve('D3y=D2y-Dy-y+t^2','y(0)=0','Dy(0)=1','D2y(0)=-1');
tt=linspace(0,10,1001); %表示t从0到10
for i=1:1001
t=tt(i);
yy(i)=eval(y);
end
plot(tt,yy)