matlab 的程序要不?a=zeros(1,5);b=zeros(1,5);c=zeros(1,5);d=zeros(1,5);u=zeros(1,5);x=zeros(1,5);y=zeros(1,5);a(:)=-1;b(:)=4;c(:)=-1;d(:)=[100,0,0,0,200];u(1)=c(1)/b(1);y(1)=d(1)/b(1);for n=2:4 u(n)=c(n)/(b(n)-u(n-1)*a(n));endfor t=2:5 y(t)=(d(t)-y(t-1)*a(t))/(b(t)-u(t-1)*a(t));endx(5)=y(5);for s=-2:-1:-5 x(s+6)=y(s+6)-u(s+6)*x(s+7);endx%%下一问题一样:a=zeros(1,10);b=zeros(1,10);c=zeros(1,10);d=zeros(1,10);u=zeros(1,10);x=zeros(1,10);y=zeros(1,10);a(:)=1;b(:)=-2;c(:)=1;d(:)=[-0.5,-1.5,-1.5,-1.5,-1.5,-1.5,-1.5,-1.5,-1.5,-0.5];u(1)=c(1)/b(1);y(1)=d(1)/b(1);for n=2:9 u(n)=c(n)/(b(n)-u(n-1)*a(n));endfor t=2:10 y(t)=(d(t)-y(t-1)*a(t))/(b(t)-u(t-1)*a(t));endx(10)=y(10);for s=-2:-1:-10 x(s+11)=y(s+11)-u(s+11)*x(s+12);endx