CLC Clear X (-3:0.01:6) y X. 3-4 X. 2+2 x-4 Plot (X, Y,,, 2) Grid

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

clc%limpia el command windows

clear%para quitar variables de la


memoria
x=[-3:0.01:6];
y=x.^3-4*x.^2+2*x-4;
plot(x,y,'m','linewidth',2)
grid on

80

60

40

20

-20

-40

-60

-80
-3 -2 -1 0 1 2 3 4 5 6

clc%limpia el command windows


clear%para quitar variables de la
memoria
x=[-4:0.01:4];
y1=3./(x.^2+1);
y2=exp(x/3)+1/2;
plot(x,y1,'r','linewidth',2)
hold on
plot(x,y2,'b','linewidth',2)
hold off
grid on

4.5

3.5

2.5

1.5

0.5

0
-4 -3 -2 -1 0 1 2 3 4

clc%limpia el command windows


clear%para quitar variables de la
memoria
x=[-2*pi:pi/50:3*pi];
y=3*cos(2*x)-5*sin(x);
plot(x,y,'g','linewidth',2)
grid on
6

-2

-4

-6

-8
-8 -6 -4 -2 0 2 4 6 8 10

clc%limpia el command windows


clear%para quitar variables de la
memoria
x=[-1:0.01:8];
y1=abs(x-5);
y2=-(x-4).^2+10
plot(x,y1,'r','linewidth',2)
hold on
plot(x,y2,'b','linewidth',2)
hold off
grid on
10

-5

-10

-15
-1 0 1 2 3 4 5 6 7 8

clc%limpia el command windows


clear%para quitar variables de la memoria
x=[-1:0.01:8];
y1=abs(x-5);
y2=-(x-4).^2+10
plot(x,y1,'r','linewidth',2)
hold on
plot(x,y2,'b','linewidth',2)
hold off
grid on
axis([-2 9 -15 15])
15

10

-5

-10

-15
-2 -1 0 1 2 3 4 5 6 7 8 9

clc%limpia el command windows


clear%para quitar variables de la memoria
x=[-4:0.01:4];
y=1./x;
plot(x,y,'m','linewidth',2)
grid on
150

100

50

-50

-100

-150
-4 -3 -2 -1 0 1 2 3 4

clc%limpia el command windows


clear%para quitar variables de la memoria
x=[-4:0.01:4];
y=1./x;
plot(x,y,'m','linewidth',2)
grid on
axis([-4 4 -15 15])
15

10

-5

-10

-15
-4 -3 -2 -1 0 1 2 3 4

You might also like