有谁知道雅可比、高斯--塞德尔迭代法的程序实现??

[复制链接]
查看11 | 回复1 | 2011-4-20 00:50:30 | 显示全部楼层 |阅读模式
ss_seidel.m然后将下面输入,并保存function x=Gauss_Seidel(A,b,x0,tol)if (nargin==2)x0=ones(size(b));tol=1e-6;elseif (nargin==3)tol=1e-6;elsesprintf('USAGE:Gauss_Seidel(A,b,x0,tol)')endD=diag(diag(A));U=triu(A,1);L=tril(A,-1);G=-(D+L)\U;d1=(D+L)\b;x=G*x0+d1;n=1;while norm(x-x0)>=tol
x0=x;
x=
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行