newtraph - ea=abs((xi-xold)/xi); fprintf(' %1d %7.6f %6.5f...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function newtraph(xi,iter) %problem 6.4, using Newton-Raphson method iter=iter+1; count=0; xold=0; disp(' i xi f(x) f_(x) ea'); while(1) f=8*sin(xi)*exp(-xi)-1; f_prime=(8*cos(xi)/exp(xi)) - (8*sin(xi)/exp(xi));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ea=abs((xi-xold)/xi); fprintf(' %1d %7.6f %6.5f %6.5f %6.5f\n',count, xi,f,f_prime,ea) xold=xi; xi=xi-(f/f_prime); count=count+1; if count==iter; break; end end end...
View Full Document

This note was uploaded on 09/27/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Ask a homework question - tutors are online