Está en la página 1de 5

UNIVERSIDAD DE LAS FUERZAS

ARMADAS ESPE

METODOS
NUMERICOS

DEBER No.1

Latex y Programaci
on Matlab

Nombre : Tnte.de E. Vega C. Cristian A.

NRC: 2117

FECHA:19 DE MAYO DEL 2016

Indice

1. MENU
1.1. Codigo del men
u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2. Compilacion del men
u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
3
4

2. OPCIONES
DEL MENU
2.1. Metodo Newton Rapson . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1. Compilacion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4
5
5

3. BIBLIOGRAFIA

UNIVERSIDAD DE LAS FUERZAS ARMADAS-ESPE

NOMBRES: JAZMIN ORBEA


MARIA AUGUSTA ROSERO
FECHA: 10-06-2016
NRC:1540

1.
1.1.

MENU
C
odigo del men
u

o
%MenA
a =0;
w h i l e ( a<3)
d i s p ( I n g r e s e una o p c i o n : ) ;
d i s p ( 1. Metodo de Newton : ) ;
d i s p ( 2. Metodo de l a b i s e c c i o n : ) ;
d i s p ( 3. S a l i r
: );

a=i n p u t ( I n g r e s e su o p c i o n : ) ;

switch a
case 1
ban =0;
w h i l e ( ban=2)
sym x ;

y=i n p u t ( i n g r e s e l a f u n c i o n : , s ) ;
t o l =0.001;
fun=i n l i n e ( y ) ;
fun1= d i f f ( sym ( y ) ) ;
dx=i n l i n e ( fun1 ) ;
a=i n p u t ( i n g r e s e e l extremo d e l i n t e r v a l o i n f e r i o r : ) ;
b=i n p u t ( i n g r e s e e l extremo d e l i n t e r v a l o s u p e r i o r : ) ;
g r i d on
3

e z p l o t ( fun , [ a , b ] )

c=i n p u t ( I n g r e s e un punto : ) ;
fun ( c ) ;
dx ( c ) ;
n=1;
w h i l e abs ( fun ( c ))> t o l
m=(c (fun ( c ) / dx ( c ) ) ) ;
fun (m) ;
dx (m) ;
c=m;
n=n+1;
end
f p r i n t f ( La r a i z de l a f u n c i o n e s %f \n , c )
ban=i n p u t ( Desea c o n t i n u a r ? s i =1, no = 2 : ) ;
end
otherwise
end

end

1.2.

Compilaci
on del men
u

Figura 1: Men
u Ejecutado

2.

OPCIONES
DEL MENU

2.1.
2.1.1.

M
etodo Newton Rapson
Compilaci
on

Figura 2: Ejecutada opcion 1

3.

BIBLIOGRAFIA

Referencias
[1] Uso de Matlab:http://www.mathworks.com/products
/matlab/?requestedDomain=www.mathworks.com

También podría gustarte