数值代数第二次作业报告.doc

  1. 1、本文档共7页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数值代数第二次作业报告

Gaussian elimination with scaled row pivoting Solving systems using Gaussian elimination with scaled row pivoting Part 1 An introduction to the algorithm The algorithm consists of two parts: a factorization phase and a solution phase Here is an algorithm to do the factorization phase: input n,( aij) for i=1 to n do pi ← i si ← max1≤j≤naij end do for k=1 to n-1 do select j ≥ k so that apjk/spj≥apik/spi for i=k,k+1,…,n pk ? pj for i=k+1 to n do z ←apik/apkk; apik ← z for j=k+1 to n do apij←apij- zapkj end do end do end do output(aij),( pi) Here is an algorithm to do the solution phase: input n,( aij),( pi),( bi) for k=1 to n-1 do for i=k+1 to n do bpi←bpi- apikbpk end do end do for i=n to 1 step -1 do xi←bpi-j=i+1napijxj/apii end do output (xi) We also give out the algorithms to find out the unit lower triangular matrix L and the upper triangular matrix U: input n,( aij), ( pi) for i=1 to n do for j=1 to n do lij ← 0 end do end do for i=1 to n do lii ← 1 end do for i=1 to n-1 do for j=1 to i do li+1,j ← api+1j end do end do output (lij) input n,( aij), ( pi) for i=1 to n do for j=1 to n do uij ← 0 end do end do for i=1 to n do for j=i to n do uij ← apij end do end do output (uij) Part 2 Solving systems System 1 -911732-1681 x1x2x3= 59-3 According to the the algorithms given in Part 1, we write a C program (see the Appendix) to solve this systems.Here is the result: PA=100-1.500000100.500000-00000008.0000001.000000013500000001.346154 where P=001100010 A=-911732-1681 The solution X=x1x2x3=13.047619-11.1428577.857143 System 2 0.2641x1+0.1735x2+0.8642x3=-0.75210.9411x1+0.0175x2+0.1463x3=0.6310-0.8641x1-0.4243x2+0.0711x3=0.2501 To solve this system,we only need to change the matrix A and the vector b in the C program with proper numbers.Here is the result: PA=100-10.305636-0.0985551-0.864100-0.4243000.0711000-0.4446090.223736000.907981 where P=001010100

文档评论(0)

xy88118 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档