Vous êtes sur la page 1sur 13

Universidad Nacional Mayor de

San Marcos
Facultad De Ingeniería Geológica, Minera, Metalúrgica Y Geográfica

MÉTODOS
NUMÉRICOS

11vo Laboratorio
Docente

Gladys Giovanna Melgarejo Estremadoyro

Alumno

Bryan Anthony Sancho Atoccsa

V CICLO

2022
INDICE
BAR 1) ............................................................................................................................................ 3
BAR 2) ............................................................................................................................................ 3
BARH 3) ......................................................................................................................................... 4
BARH 4) ......................................................................................................................................... 4
STAIRS 5) ....................................................................................................................................... 5
STAIRS 6) ....................................................................................................................................... 5
STEM 7) ......................................................................................................................................... 6
STEM 8) ......................................................................................................................................... 6
PIE 9).............................................................................................................................................. 7
PIE 10)............................................................................................................................................ 8
HIST 11) ......................................................................................................................................... 9
HIST 12) ....................................................................................................................................... 10
GRAFICO 1) .................................................................................................................................. 11
GRAFICO 2) .................................................................................................................................. 12
GRAFICO 3) .................................................................................................................................. 13
BAR 1)
>> x=[0:3:30];

>> y=log(x)+sin(x);

>> bar(x,y,1.5)

BAR 2)
>> x=[5:10:100];

>> y=sin(x.^2).*cos(x);

>> bar(x,y,1.5,'r')
BARH 3)
>> x=[1 2 3 4 5 6 7 8 9 10];

>> y=x.^4+cos(x).*tan(3.*x);

>> barh(x,y,'c')

BARH 4)
>> x=[0:5:30];

>> y=3.*sin(x)-log(2.*x+10);

>> barh(x,y,'k')
STAIRS 5)
>> x=[1 2 3 4 5 6 7 8 9 10];

>> y=x.^2-(1+10^(1/2)).*x+10^(1/2);

>> stairs(x,y,':sk','linewidth',3,'markersize',10)

STAIRS 6)
>> x=[4:10:84];

>> y=exp(x)+sin(x).*3.*x;

>> stairs(x,y,'--xr','linewidth',1,'markersize',10)
STEM 7)
>> x=[1:1:20];

>> y=3.*exp(x)+sin(x).*cos(x);

>> stem(x,y)

STEM 8)
>> x=[10:5:60];

>> y=3.*x.^2+210.*x+3675;

>> stem(x,y,'g')
PIE 9)
>> x=[5 10 15 20 25 30 35 40 45];

>> pie(x)

>> title('Preferencias de bebidas')


PIE 10)
>> x=2:4;

>> labels={'Opcion 1','Opcion 2','Opcion 3'};

>> p=pie(x,labels)

p=

1×6 graphics array:

Patch Text Patch Text Patch Text

>> title('Toma de decisiones''\fontsize{30}')


HIST 11)
>> x=[2 4 2 7 8 5 4 2 6 7 9 5 4 2 5 7 8 9 0 0 6 4 3];

>> hist(x)

>> title('Numero de elecciones por opcion')

>> xlabel('Opciones')

>> ylabel('Elecciones')
HIST 12)
>> x=[9 3 7 5 6 5 7 3 8 2 9 2 7 4 7 5 8 5 9 4];

>> hist(x)

>> title('CANTIDAD DE VOTOS')

>> xlabel('Candidato')

>> ylabel('Votos')
GRAFICO 1)
>> x=-8:0.8:8;

>> y=-8:0.8:8;

>> [x,y]=meshgrid(x,y);

>> z=(x.^2+y.^2).^(1/2);

>> mesh(x,y,z)

>> surf(x,y,z)
GRAFICO 2)
>> x=0:1:40;

>> y=0:1:40;

>> [x,y]=meshgrid(x,y);

>> z=(x.^4+sin(y));

>> mesh(x,y,z)

>> surf(x,y,z)
GRAFICO 3)
>> x=5:5:100;

>> y=5:5:100;

>> [x,y]=meshgrid(x,y);

>> z=(3.*y.^3+log(x)-sin(3.*y));

>> mesh(x,y,z)

>> surf(x,y,z)

Vous aimerez peut-être aussi