Documentos de Académico
Documentos de Profesional
Documentos de Cultura
function METODOPUNTOFIJO
global funcion1 funcion
fprintf('METODO DE PUNTO FIJO:\n');
funcion=input('INGRESE LA FUNCIÓN y(x):\n','s');
funcion1=input('INGRESE LA FUNCIÓN g(x):\n','s');
x0=input('INGRESE EL PUNTO INICIAL:\n');
error=input('INGRESE EL ERROR :\n');
it=0;
fprintf('it x0 x1 x0-x1');
while(it<50)
it=it+1;
x=x0;
x1=eval(funcion1);
fprintf('\n%3.0f%13.9f%13.9f\n%13.9f\n',it,x0,x1,abs(x0-x1));
if(abs(x1-x0)<error)
fprintf('el proceso se cumple satisfactoriamente:\n');
break
end
x0=x1;
end
it x0 x1 x0-x1
METODO DE NEWTONRAPHSON:
INGRESE EL ERROR :
0.001
it x0 x1 x0-x1