数值线性代数第二版徐树方高立张平文上机习题第二章实验报告24900.pdf
《数值线性代数第二版徐树方高立张平文上机习题第二章实验报告24900.pdf》由会员分享,可在线阅读,更多相关《数值线性代数第二版徐树方高立张平文上机习题第二章实验报告24900.pdf(12页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 1(1)估计 5 到 20 阶 Hilbert 矩阵的范数条件数(2)设nnRA111111111011001,先随机地选取nRx,并计算出xAbn;然后再用列主元 Gauss 消去法求解该方程组,假定计算解为x。试对 n 从 5 到 30 估计计算解x的精度,并且与真实相对误差作比较。解(1)分析:利用for使n从 5 循环到 20,利用()hilb函数得到 Hilbert 矩阵A;先将算法编制成通用的子程序,利用算法编成的子程序)(Boptv,对TAB求解,得到1A的 一 个 估 计 值vv;再 利 用inf),(Anorm得 到A;则 条 件 数inf),(1AnormvAAK。另,矩
2、阵A的范数条件数可由inf),(Acond直接算出,两者可进行比较。程序为 1 算法编成的子程序)(Boptv function v=opt(B)k=1;n=length(B);x=1./n*ones(n,1);while k=1 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 be inaccurate.RCOND=.In cond at 47 In ex2_1 at 6 n=12 估计条件数为+16 实际条件数为
3、+16 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In ex2_1 at 3 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In cond at 47 In ex2_1 at 6 4 n=13 估计条件数为+18 实际条件数为+18 Warning:Matrix is close to singular or badly scaled.Resul
4、ts may be inaccurate.RCOND=.In ex2_1 at 3 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In cond at 47 In ex2_1 at 6 n=14 估计条件数为+17 实际条件数为+17 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In ex2_1 at 3 Warning:Matrix is clo
5、se to singular or badly scaled.Results may be inaccurate.RCOND=.In cond at 47 In ex2_1 at 6 n=15 估计条件数为+17 实际条件数为+17 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In ex2_1 at 3 Warning:Matrix is close to singular or badly scaled.Results may be 5 inaccurate.RCON
6、D=.In cond at 47 In ex2_1 at 6 n=16 估计条件数为+17 实际条件数为+17 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In ex2_1 at 3 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In cond at 47 In ex2_1 at 6 n=17 估计条件数为+18 实际条件数为+18 Warning
7、:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In ex2_1 at 3 Warning:Matrix is close to singular or badly scaled.Results may be inaccurate.RCOND=.In cond at 47 In ex2_1 at 6 n=18 估计条件数为+18 实际条件数为+18 Warning:Matrix is close to singular or badly scaled.Results may be 6 i
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数值 线性代数 第二 版徐树方高立张平文 上机 习题 实验 报告 24900
限制150内