metodo de newton

2
ESCUELA SUPERIOR POLITÉCNICA DE CHIMBORAZO Facultad: Mecánica Escuela: Ing. Automotriz Carrera: Ing. Automotriz Catedra: Métodos numéricos Fecha: 08-06/2015 N!"re:Cristian Calle c#d$% 1581 %METODO DE NEWTON clc clear fprintf(' METODO DE NEWTON\n\n\n'); format long; Xo=input ('ingrese el alor inicial\n'); !ter=input ('\ningrese el n"mero #e iteraciones\n'); Tol=input ('\ningrese la tolerancia $ue #esea\n'); =input ('\ningrese la funci&n en comillas simples\n'); f=inline( ); =f(Xo); Deria#a=#iff( ) Der=c ar(Deria#a); D=inline(Der); De=D(Xo); Error=Tol* ; +ont=,; - = .+ont/ Xo/ / De/ Error0; -= .+ont/ Xo/ / De/ Error0; 1 ile 2=, 3 Error4Tol 3 +ont5!ter 3 De2=, X =Xo6( 7De); =f(X ); De=D(X ); Error=a8s((X 6Xo)7X ); +ont=+ont* ; -(+ont/ )=+ont; -(+ont/9)=Xo; -(+ont/:)= ; -(+ont/ )=De; -(+ont/<)=Error; Xo=X ;

description

word matlap

Transcript of metodo de newton

ESCUELA SUPERIOR POLITCNICA DE CHIMBORAZO

Facultad: MecnicaEscuela: Ing. AutomotrizCarrera: Ing. AutomotrizCatedra: Mtodos numricosFecha: 08-06/2015Nombre: Cristian Callecdigo: 1581

%METODO DE NEWTON clc clear fprintf(' METODO DE NEWTON\n\n\n'); format long; Xo=input ('ingrese el valor inicial\n');Iter=input ('\ningrese el nmero de iteraciones\n');Tol=input ('\ningrese la tolerancia que desea\n');F=input ('\ningrese la funcin en comillas simples\n'); f=inline(F); Y1=f(Xo);Derivada=diff(F)Der=char(Derivada);D=inline(Der); De=D(Xo); Error=Tol+1;Cont=0;Z1= [Cont, Xo, Y1, De, Error]; Z= [Cont, Xo, Y1, De, Error];while Y1~=0 & Error>Tol & Cont