Professional Documents
Culture Documents
http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/power...
clear all x=[1;1;1]; % The Newton-Raphson iterations starts here del=1; indx=0; while del>1e-6 g=[x(1)^2-x(2)^2+x(3)^2-11;x(1)*x(2)+x(2)^2-3*x(3)-3; x(1)-x(1)*x(3)+x(2)*x(3)-6]; J=[2*x(1) -2*x(2) 2*x(3);x(2) x(1)+2*x(2) -3;1-x(3) x(3) -x(1)+x(2)]; delx=-inv(J)*g; x=x+delx; del=max(abs(g)); indx=indx+1; end 'NEWTON-RAPHSON SOLUTION CONVERGES IN ITERATIONS',indx,pause 'FINAL VALUES OF x ARE',x
1 of 1
03/10/2012 10:30 PM