《数值分析雅克比高斯迭代法MATLAB程序》由会员分享,可在线阅读,更多相关《数值分析雅克比高斯迭代法MATLAB程序(9页珍藏版)》请在金锄头文库上搜索。
Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-date数值分析雅克比高斯迭代法MATLAB程序数值分析雅克比高斯迭代法MATLAB程序1.雅可比迭代法:function x,n=jaccbi(A,b,x0,eps,t)if nargin=3; eps=1e-6; m=200;elseif nargin=eps x0=x; x=B*x0+f; n=n+1; if(n=m) disp(可能不收敛); return; end;end2.高斯赛德尔迭代法:function x,n=gsdddy(A,b,x0,eps,t)if nargin=3; eps=1e-6; m=200;elseif nargin=eps x0=x; x=B*x0+f; n=n+1; if(n=m) disp(迭代次数过多,可能不收敛); return; end;endPS:有兴趣小朋友试一下,结果与x0无关-