高手帮帮忙啊
我用牛顿迭代法对非线性方组求解时出现问题,请高手帮忙看下啊程序如下:function [r,n]=mulNewton3(F,x0,eps)
if nargin==1
eps=1.0e-4;
end
J=jacobian(sym(F));
fa=subs(sym(F),x0);
fb=subs(sym(J),x0);
r=x0-fa/fb;
n=1;
tol=1;
while tol>eps
x0=r;
r=x0-fa/fb;
tol=norm(r-x0);
n=n+1;
if(n>100000)
disp('******');
return;
end
end
出错部分如下:
J=jacobian(sym(F));
fa=subs(sym(F),x0);
fb=subs(sym(J),x0);