欢迎来到天天文库
浏览记录
ID:4169571
大小:34.50 KB
页数:3页
时间:2017-11-29
《用雅克比迭代法和高斯-赛德迭代法解方程组》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、解:由x=[1;2;3],算出b=[-3;7;6]知:X1=(2*X3-3)/3X2=(-X3+7)/2X3=(2X1-X2+6)/21.雅克比法:X1(1)=0;X2(1)=0;X3(1)=0;fori=1:50X1(i+1)=(2*X3(i)-3)/3;X2(i+1)=(-X3(i)+7)/2;X3(i+1)=(2*X1(i)-X2(i)+6)/2;End迭代50次结果如下:X1=Columns1through110-1.00001.0000-0.83331.0000-0.68061.0000-0.54051.0000-0.41211.0000Columns12through
2、22-0.29451.0000-0.18661.0000-0.08771.00000.00291.00000.08601.00000.1622Columns23through331.00000.23201.00000.29601.00000.35471.00000.40851.00000.45771.0000Columns34through440.50291.00000.54441.00000.58231.00000.61711.00000.64901.00000.6783Columns45through511.00000.70511.00000.72971.00000.7522
3、1.0000X2=Columns1through1103.50002.00003.37502.00003.26042.00003.15542.00003.05912.0000Columns12through222.97082.00002.88992.00002.81582.00002.74782.00002.68552.00002.6284Columns23through332.00002.57602.00002.52802.00002.48402.00002.44372.00002.40672.0000Columns34through442.37282.00002.34172.
4、00002.31332.00002.28712.00002.26322.00002.2413Columns45through512.00002.22122.00002.20272.00002.18592.0000X3=Columns1through1103.00000.25003.00000.47923.00000.68923.00000.88183.00001.0583Columns12through223.00001.22013.00001.36843.00001.50443.00001.62903.00001.74333.0000Columns23through331.84
5、803.00001.94403.00002.03203.00002.11273.00002.18663.00002.2544Columns34through443.00002.31653.00002.37353.00002.42573.00002.47363.00002.51743.0000Columns45through512.55763.00002.59453.00002.62833.00002.65931.高斯-赛德法:XX1(1)=0;XX2(1)=0;XX3(1)=0;fori=1:50XX1(i+1)=(2*X3(i)-3)/3;XX2(i+1)=(-X3(i)+7)
6、/2;XX3(i+1)=(2*X1(i+1)-X2(i+1)+6)/2;End迭代50次结果如下:X1=Columns1through110-1.00001.0000-0.83331.0000-0.68061.0000-0.54051.0000-0.41211.0000Columns12through22-0.29451.0000-0.18661.0000-0.08771.00000.00291.00000.08601.00000.1622Columns23through331.00000.23201.00000.29601.00000.35471.00000.40851.000
7、00.45771.0000Columns34through440.50291.00000.54441.00000.58231.00000.61711.00000.64901.00000.6783Columns45through511.00000.70511.00000.72971.00000.75221.0000X2=Columns1through1103.50002.00003.37502.00003.26042.00003.15542.00003.05912.0000Colu
此文档下载收益归作者所有