Académique Documents
Professionnel Documents
Culture Documents
1.
Graficar
( )
x=[-3:.5:3];
y=x.^2;
plot(x,y)
2.
Graficar ( )
] (tipo line).
x=[-1:0.1:5];
y=sin(x.^2);
plot(x,y)
3.
Graficar
( )
] (tipo bar)
x=[-3:0.2:3];
y=exp(-x.^2);
bar(x,y)
4.
Graficar ( )
( )
] (tipo stairs)
( )
] (tipo polar)
x=[0:0.2:10];
y=sin(x);
stairs(x,y)
5.
Graficar ( )
x= [0:0.2:10];
y=sin(x);
polar(x,y)
6.
Graficar ( )
( )
] (tipo fplot)
] (tipo stem)
x=[0:0.1:2*pi];
y=abs(sin(2*x).*cos(2*x));
stem(x,y)
7.
x=[1:2:9];
pie(x)
8.
Graficar ( )
fplot('cos(x)',[-3,3])
9.
x=[-3:0.2:4];
y=sin(x).^3-x;
plot(x,y,'o')
x=[1:0.2:10];
y=cos(x);
fill(x,y,'m')
( )
( )
] m es el color de la linea
11.Poner leyendas
x=-2:0.05:5;
y=-x.^2+sin(x);
h=plot(x,y);
text(2.7,-4,'y=-x.^2+sin(x)');
xlabel('valores de x');
ylabel('valores de y');
legend('curva x vs y');
set(h,'LineWidth',2,'LineStyle','--','Color','r');
grid on;
figure;
plot(x,y,'-.sr','linewidth',2,'LineStyle','--','Color','r','MarkerEdgeColor','k','MarkerEdgeColor','g','MarkerSize',10);
grid on;
12.MLTIPLES GRAFICAS
x= 0:0.05:5;
y=sin(x);
z=cos(x);
plot(x,y,x,z)
plot(x,w, 'g')
grid
t=0:0.3:5;
x=t.^2;
y=2*t-5;
z=sin(t);
u=cos(t);
v=abs(t);
w=sqrt(t);
subplot(3,2,1),plot(t,x),title('Grafica 1');
subplot(3,2,2),plot(t,y),title('Grafica 2');
subplot(3,2,3),plot(t,z),title('Grafica 3');
subplot(3,2,4),plot(t,u),title('Grafica 4');
subplot(3,2,5),plot(t,v),title('Grafica 5');
subplot(3,2,6),plot(t,w),title('Grafica 6');
k secuencia de grficas.
16. fill3
t=[-6:0.2:8];
x=t;
y=3-t;
z=cos(t);
c=[1 0.8 0.1];
fill3(x,y,z,c);
grid
[x,y]=meshgrid(-2:0.2:2);
z=x.*exp(-x.^2-y.^2);
mesh(x,y,z);
title('z=x.*exp(-x.^2-y.^2)');
xlabel('x');ylabel('y');zlabel('z');
18.Meshc
[x,y]=meshgrid(-2:0.2:2);
z=x.*exp(-x.^2-y.^2);
meshc(x,y,z);
title('z=x.*exp(-x.^2-y.^2)');
xlabel('x');ylabel('y');zlabel('z');
19.