在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 function x=chase (a,b,c,f) 2 % the method of chaase******************************* 3 % a, b, c,分别是是方程组的下对角,主对角,上对角的三条 4 % alpha,beta, gama分别是Crout分解的主和次对角线 5 % /beta(1) 0 ... ... 0 0 \ 6 % |alpha(2) beta(2) ... ... 0 0 | 7 % L=|0 alpha(3) ...beta(3) | 8 % | | 9 % | | 10 % \ alpha(3) beta(n) / 11 %******************************************************** 12 beta(1)=b(1);gama(1)=c(1)/beta(1);y(1)=f(1)/beta(1); 13 for i=2:length(b) 14 alpha(i-1)=a(i-1);beta(i)=b(i)-alpha(i-1)*gama(i-1); 15 if i<=length(b)-1 16 gama(i)=c(i)/beta(i); 17 end 18 y(i)=(f(i)-alpha(i-1)*y(i-1))/beta(i); 19 end 20 x(length(b))=y(length(b)); 21 for i=length(b)-1:-1:1 22 x(i)=y(i)-gama(i)*x(i+1); 23 end
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论