实验一(Gauss消元法)运行结果.doc

上传人:新** 文档编号:562455737 上传时间:2022-11-15 格式:DOC 页数:13 大小:71.01KB
返回 下载 相关 举报
实验一(Gauss消元法)运行结果.doc_第1页
第1页 / 共13页
实验一(Gauss消元法)运行结果.doc_第2页
第2页 / 共13页
实验一(Gauss消元法)运行结果.doc_第3页
第3页 / 共13页
实验一(Gauss消元法)运行结果.doc_第4页
第4页 / 共13页
实验一(Gauss消元法)运行结果.doc_第5页
第5页 / 共13页
点击查看更多>>
资源描述

《实验一(Gauss消元法)运行结果.doc》由会员分享,可在线阅读,更多相关《实验一(Gauss消元法)运行结果.doc(13页珍藏版)》请在金锄头文库上搜索。

1、(1) A=1 -1 2 -1;2 -2 3 -3;1 1 1 0;1 -1 4 3A = 1 -1 2 -1 2 -2 3 -3 1 1 1 0 1 -1 4 3 b=-8;-20;-2;4b = -8 -20 -2 4 Gauss(A,b)ans =方程的解为:x = -6.999999999999995 2.999999999999998 1.999999999999997 2.000000000000002ans =将解代回原方程的b值为:b1 = -8.000000000000000 -20.000000000000000 -1.999999999999999 4.000000000

2、000001ans =用Gauss消元法求解的误差为:eps =8.881784197001252e-016(2) A=2 -2 3 -3;0.5 2 -0.5 1.5;0.5 0 2.5 4.5;0.5 0 0.2 -0.4A = 2.0000 -2.0000 3.0000 -3.0000 0.5000 2.0000 -0.5000 1.5000 0.5000 0 2.5000 4.5000 0.5000 0 0.2000 -0.4000 b=-14;6;4;4b = -14 6 4 4 Gauss(A,b)ans =方程的解为:x = 25.161290322580641 -16.6129

3、03225806445 -22.129032258064509 10.387096774193546ans =将解代回原方程的b值为:b1 = -13.999999999999986 6.000000000000005 4.000000000000007 3.999999999999998ans =用Gauss消元法求解的误差为:eps = 1.421085471520200e-014(3)当n=10,epa=10(-8)时 Hilbert(10)ans =调用Matlab中的求解方法得方程的解为:X = 1.0e+008 * -0.000010000536808 0.000980145358

4、690 -0.023285748784478 0.233041295975382 -1.210849606049417 3.594699761410605 -6.323293521651502 6.511359727102452 -3.623250622643409 0.840659070115685ans =将解代回原方程的b值为:B = 1.000000016763806 2.000000011175871 3.000000013038516 3.999999996274710 4.999999996274710 6.000000011175871 6.999999977648258 8.

5、000000002793968 8.999999997206032 9.999999999068677ans =调用Matlab中的求解方法所得解的误差为:Eps = 2.235174179077148e-008ans =用Gauss消元法求解ans =方程的解为:x = 1.0e+008 * -0.000009998189333 0.000979943729515 -0.023281474448207 0.233002589297955 -1.210665589649560 3.594195329741595 -6.322467936982889 6.510563619059260 -3.6

6、22833473612402 0.840567489802648ans =将解代回原方程的b值为:b1 = 1.000000022351742 2.000000010244548 3.000000001862645 3.999999999068677 4.999999997206032 6.000000004656613 7.000000005587935 8.000000001862645 9.000000002793968 9.999999999068677ans =用Gauss消元法求解的误差为:eps = 2.235174179077148e-008 Hilbert(20)ans =调

7、用Matlab中的求解方法得方程的解为:Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.155429e-019. In Hilbert at 10X = 1.0e+011 * -0.000000054969082 0.000007449529227 -0.000240144656571 0.003112896556161 -0.018623674273773 0.041687986269915 0.088208328284896 -0.7608625768696

8、90 1.891773066130101 -2.216542838697581 1.453213402414779 -2.152916051015602 4.065599020002215 -1.550761430815151 -4.686523239294571 5.376685855620782 0.274775676104780 -3.514618861096992 2.109957473539846 -0.403931979506409ans =将解代回原方程的b值为:B = 0.999998807907104 2.000000476837158 3.000002145767212 4

9、.000010490417481 4.999999046325684 6.000000476837158 6.999995708465576 8.000007390975952 8.999995946884155 9.999998331069946 10.999999284744263 12.000000000000000 12.999996185302734 13.999998807907104 14.999997377395630 15.999998331069946 17.000001907348633 18.000001668930054 18.999998569488525 20.0

10、00003576278687ans =调用Matlab中的求解方法所得解的误差为:Eps = 1.049041748046875e-005ans =用Gauss消元法求解ans =方程的解为:x = 1.0e+011 * -0.000000019403479 0.000002224327321 -0.000052948755227 0.000292943947258 0.003055979360522 -0.048410769637596 0.272233813446375 -0.801741932331504 1.279514828414700 -1.002230604726971 0.51

11、2286793235479 -1.217355332825580 1.628287811382938 1.072830296431727 -4.445149808843506 4.240040586321134 -2.062975569006028 1.022957694306069 -0.640594666579924 0.187009007088494ans =将解代回原方程的b值为:b1 = 1.000001788139343 1.999997138977051 2.999997258186340 3.999997019767761 4.999995827674866 5.9999984

12、50279236 7.000000834465027 7.999997615814209 8.999993085861206 10.000001668930054 11.000000953674316 11.999999165534973 12.999999761581421 13.999998450279236 14.999994039535522 15.999999046325684 17.000002145767212 18.000002562999725 18.999998450279236 20.000000059604645ans =用Gauss消元法求解的误差为:eps = 6.914138793945313e-006 Hilbert(30)ans =调用Matlab中的求解方法得方程的解为:Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.555731e-019. In Hilbert at 10X = 1.0e+011 * -0.000000050506225 0.000007568762891 -0.000273590815198

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号