Download - metodo de newton

Transcript

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