17.11.2012 Views

Numerical recipes

Numerical recipes

Numerical recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

9.7 Globally Convergent Methods for Nonlinear Systems of Equations 391<br />

qt=matrix(1,n,1,n);<br />

r=matrix(1,n,1,n);<br />

s=vector(1,n);<br />

t=vector(1,n);<br />

w=vector(1,n);<br />

xold=vector(1,n);<br />

fvec=vector(1,n); Define global variables.<br />

nn=n;<br />

nrfuncv=vecfunc;<br />

f=fmin(x); The vector fvec is also computed by this<br />

test=0.0;<br />

call.<br />

for (i=1;i test)test=fabs(fvec[i]);<br />

if (test < 0.01*TOLF) {<br />

*check=0;<br />

FREERETURN<br />

}<br />

stringent test than simply<br />

TOLF.<br />

for (sum=0.0,i=1;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!