1 / 4

线性方程组直接法

线性方程组直接法. (1) 用 改进的平方根法 求解下面的线性方程组 其中 H 是 32 阶的 Hilbert 矩阵, b 是全 1 向量。 要求输出残量的 2- 范数,即 r=norm(b-H*x). ( M 文件取名为 hw41.m ). 提示 : 生成一个 n 阶的 Hilbert 矩阵 : H=hilb(n) 生成一个长度为 n 的全 1 向量: b=ones(n,1) 改进的平方根算法参见教材第 158 , 159 页. 线性方程组直接法. (2) 用 追赶法 求解下面的线性方程组

trang
Download Presentation

线性方程组直接法

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 线性方程组直接法 (1) 用改进的平方根法求解下面的线性方程组 其中 H是 32 阶的 Hilbert 矩阵,b是全 1 向量。 要求输出残量的 2-范数,即 r=norm(b-H*x) (M文件取名为 hw41.m) 提示: • 生成一个 n阶的 Hilbert 矩阵: H=hilb(n) • 生成一个长度为 n的全 1 向量:b=ones(n,1) • 改进的平方根算法参见教材第 158,159 页

  2. 线性方程组直接法 (2) 用追赶法求解下面的线性方程组 其中 要求输出残量的 2-范数。 (M文件取名为 hw42.m) 提示: • 生成三对角矩阵可以使用 diag 命令 • 追赶法参见教材第 159,160 页

  3. 线性方程组直接法 (3) (可选题)编写函数 PLU,实现列主元 LU 分解 [L,U,p]=plu(A) (M文件取名为 plu.m) 说明: • 该分解满足:A(p,:)=L*U • A 为输入矩阵 • p 是向量,记录每次选主元时主元所在的行 • L,U 分别为单位下三角矩阵和非奇异上三角矩阵 • 可随机生成一些小矩阵进行测试, 即查看 norm(A(p,:) - L*U,'fro')是否很小

  4. 上机要求 • 上机要求 • 将所有 M 文件作为附件,发给mhjs@system.mail • 邮件主题为:机号-学号-姓名 • 每个 M文件的第一行为:%机号-学号-姓名

More Related