数值线性代数第二版徐树方高立张平文上机习题第二章实验报告.doc
《数值线性代数第二版徐树方高立张平文上机习题第二章实验报告.doc》由会员分享,可在线阅读,更多相关《数值线性代数第二版徐树方高立张平文上机习题第二章实验报告.doc(8页珍藏版)》请在三一文库上搜索。
1、1) 估计5到20阶Hilbert矩阵的范数条件数(2) 设,先随机地选取,并计算出;然后再用列主元Gauss消去法求解该方程组,假定计算解为。试对n从5到30估计计算解的精度,并且与真实相对误差作比较。解(1)分析:利用使从5循环到20,利用函数得到Hilbert矩阵;先将算法2.5.1编制成通用的子程序,利用算法2.5.1编成的子程序,对求解,得到的一个估计值;再利用得到;则条件数。 另,矩阵的范数条件数可由直接算出,两者可进行比较。程序为 1 算法2.5.1编成的子程序function v=opt(B)k=1;n=length(B);x=1./n*ones(n,1);while k=1
2、 w=B*x; v=sign(w); z=B*v; if norm(z,inf) In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 2.547634e-17. In cond at 47 In ex2_1 at 6 n=12估计条件数为3.924509699943713e+16实际条件数为3.924509699943713e+16Warning: Matrix is close to singular or badly scaled. Res
3、ults may beinaccurate. RCOND = 7.847381e-19. In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 7.847381e-19. In cond at 47 In ex2_1 at 6 n=13估计条件数为1.271531365675327e+18实际条件数为1.271531365675327e+18Warning: Matrix is close to singular or badly scaled.
4、 Results may beinaccurate. RCOND = 2.246123e-18. In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 2.246123e-18. In cond at 47 In ex2_1 at 6 n=14估计条件数为4.138368891288374e+17实际条件数为4.138368891288374e+17Warning: Matrix is close to singular or badly sca
5、led. Results may beinaccurate. RCOND = 8.491876e-19. In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 8.491876e-19. In cond at 47 In ex2_1 at 6 n=15估计条件数为4.633108811649674e+17实际条件数为5.234289848563619e+17Warning: Matrix is close to singular or badly
6、 scaled. Results may beinaccurate. RCOND = 9.137489e-19. In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 9.137489e-19. In cond at 47 In ex2_1 at 6 n=16估计条件数为8.036171638973166e+17实际条件数为8.036171638973167e+17Warning: Matrix is close to singular or b
7、adly scaled. Results may beinaccurate. RCOND = 6.244518e-19. In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 6.244518e-19. In cond at 47 In ex2_1 at 6 n=17估计条件数为1.40155292233093e+18实际条件数为1.40155292233093e+18Warning: Matrix is close to singular or
8、 badly scaled. Results may beinaccurate. RCOND = 4.693737e-19. In ex2_1 at 3 Warning: Matrix is close to singular or badly scaled. Results may beinaccurate. RCOND = 4.693737e-19. In cond at 47 In ex2_1 at 6 n=18估计条件数为2.550260641580651e+18实际条件数为2.800000737997893e+18Warning: Matrix is close to singula
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数值 线性代数 第二 版徐树方高立张平文 上机 习题 实验 报告
