MATLAB中解三对角线性方程组追赶法程序M文件函数:functionx=followup(a,b,c,d)n=length(b);u(1)=c(1)/b(1);l(1)=b(1);fori=2:nl(i)=b(i)-a(i)*u(i-1);u(i)=c(i)/l(i);endy(1)=d(1)/l(1);fori=2:ny(i)=(d(i)-y(i-1)*a(i))/l(i);endx(n)=y(n);fori=n-1:-1:1x(i)=y(i)-u(i)*x(i+1)endx,end例子:a=[0-1-1];b=[444];c=[-1-10];d=[2410];x=followup(a,b,c,d)x=1.00002.00003.0000