Documentos de Académico
Documentos de Profesional
Documentos de Cultura
%1
%2
%3
%4
%5
%7
%8
%9
% 10
%ejercicio 01
x=0:0.1:10;
y=sin(x).*exp(-0.4*x);
plot(x,y)
grid on
%ejercicio 02
t=0:0.01:2*pi;
x=4*cos(t)-cos(4*t);
y=4*sin(t)-sin(4*t);
hold on %varias graficas en la misma ventana
plot(t,x,'r')
plot(t,y,'g')
hold off
grid on
%ejercicio 03
a=0:0.01:2*pi;
r=sin(2*a).*cos(2*a);
plot(r,a)
grid on
%ejercicio 04
x=0:0.01:2*pi;
y1=sin(x);
y2=cos(x);
subplot(1,2,1)
plot(x,y1)
grid on
title('grafica 1')
xlabel('eje x')
ylabel('eje y')
subplot(1,2,2)
plot(x,y2)
grid on
xlabel('eje x')
ylabel('eje y')
%ejercicio 05
x=0:0.001:2*pi;
y1=sin(x);
y2=cos(x);
y3=sec(x);
y4=csc(x);
subplot(1,4,1)
plot(x,y1)
grid on
title('grafica 1')
subplot(1,4,2)
plot(x,y2)
grid on
title('grafica 2')
subplot(1,4,3)
plot(x,y3)
grid on
title('grafica 3')
subplot(1,4,4)
plot(x,y4)
grid on
title('grafica 4')
%ejercicio 06
ezplot('y =sin(x)') ezplot('y =sin(2*x)') ezplot('y =sin(3*x)')
ezplot('y =cos(x)') ezplot('y =cos(2*x)') ezplot('y =cos(3*x)')
ezplot('y =tan(x)') ezplot('y =tan(2*x)') ezplot('y =tan(3*x)')
ezplot('y =cot(x)') ezplot('y =cot(2*x)') ezplot('y =cot(3*x)')
ezplot('y =sec(x)') ezplot('y =sec(2*x)') ezplot('y =sec(3*x)')
ezplot('y =csc(x)') ezplot('y =csc(2*x)') ezplot('y =csc(3*x)')
%ejercicio 07
%seno
x=0:pi/20:10*pi;
y1=sin(x);
y2=sin(2*x);
y3=sin(3*x);
hold on
plot(x,y1,'r')
plot(x,y2,'k')
plot(x,y3,'g')
grid on
title('funcion seno')
xlabel('eje x')
ylabel('eje y')
legend('sin(x)','sin(2*x)','sin(3*x)')
%coseno
x=0:pi/20:10*pi;
y1=cos(x);
y2=cos(2*x);
y3=cos(3*x);
hold on
plot(x,y1,'r')
plot(x,y2,'k')
plot(x,y3,'g')
grid on
title('funcion coseno')
xlabel('eje x')
ylabel('eje y')
legend('cos(x)','cos(2*x)','cos(3*x)')
%tangente
x=0:pi/20:10*pi;
y1=tan(x);
y2=tan(2*x);
y3=tan(3*x);
hold on
plot(x,y1,'r')
plot(x,y2,'k')
plot(x,y3,'g')
grid on
title('funcion tangente')
xlabel('eje x')
ylabel('eje y')
legend('tan(x)','tan(2*x)','tan(3*x)')
%cotangente
x=0:pi/20:10*pi;
y1=cot(x);
y2=cot(2*x);
y3=cot(3*x);
hold on
plot(x,y1,'r')
plot(x,y2,'k')
plot(x,y3,'g')
grid on
title('funcion cotangente')
xlabel('eje x')
ylabel('eje y')
legend('cot(x)','cot(2*x)','cot(3*x)')
%secante
x=0:pi/20:10*pi;
y1=sec(x);
y2=sec(2*x);
y3=sec(3*x);
hold on
plot(x,y1,'r')
plot(x,y2,'k')
plot(x,y3,'g')
grid on
title('funcion secante')
xlabel('eje x')
ylabel('eje y')
legend('sec(x)','sec(2*x)','sec(3*x)')
%cosecante
x=0:pi/20:10*pi;
y1=csc(x);
y2=csc(2*x);
y3=csc(3*x);
hold on
plot(x,y1,'r')
plot(x,y2,'k')
plot(x,y3,'g')
grid on
title('funcion cosecante')
xlabel('eje x')
ylabel('eje y')
legend('csc(x)','csc(2*x)','csc(3*x)')
%ejercicio 09
%9.1
x=-4:0.1:4;
y=x.*exp(-x.^2);
plot(x,y)
grid on
%9.2
x=0:0.1:5;
y=x.*exp(-x.^2);
plot(x,y)
grid on
%9.3
x=-10:0.1:10;
y=x.*exp(-x.^2);
plot(x,y)
grid on
%ejercicio 10
ezplot('x*(x^2+4)^2') % a)
grid on
ezplot('x*(x-sqrt(x)') % b)
grid on
ezplot('log10(x)/x') % c)
grid on
ezplot('x*(x-2)/(x+1)*(x-2)') % d)
grid on
ezplot('sin(1/x)') % e)
grid on
ezplot('x/exp(abs(x-1))') % f)
grid on
t=-pi:0.01:pi; % g)
plot(2*cos(t).^3,2*sin(t).^3)
grid on
t=-pi:0.01:pi; % h)
plot(3*cos(t),2*sin(2*t))
grid on
t=-pi:0.01:pi; % i)
plot(3*cos(cos(t)+1)/2,2*sin(2*t))
grid on
t=-3:0.01:3; % j)
plot((t/pi).*(12*(t/pi).^2-9),(((t/pi).^2+2)*16(t/pi).^2+))
grid on
t=-pi:0.01:pi; % k)
plot(sin(2*t)+sin(t),-cos(2*t)-cos(t))
grid on
t=-pi:0.01:pi; % l)
plot(exp(t/4).*sin(2*t),exp(t/4).*cos(2*t))
grid on
t=-3*pi:0.01:3*pi; % m)
plot(t-11*sin(3*t)/10,-22*cos(3*t)/10)
grid on
%ejercicio 12
x=-2:0.01:4;
y=(x<0).*(x.^2)+((x>=0)&(x<1)).*1+(x>=1).*(-x+2);
plot(x,y,'g')
grid on
%ejercicio 13
x=-10:0.01:10;
y=((x>=-3)&(x<0)).*3+((x>0)&(x<3)).*(x+3)+((x>=3)&(x<6)).*(-2*x+12);
plot(x,y,'r')
grid on
%ejercicio 14
x=-20:0.01:25;
y=((x>=-4)&(x<0)).*(x+4)+((x>=0)&(x<8)).*4+(x>=12).*(x-12);
plot(x,y,'k')
grid on
%ejercicio 15
x=-pi:pi/80:pi; % a)
y=7-7*sin(x);
polar(x,y,'r')
x=-pi:pi/80:pi; % b)
y=3-6*sin(x);
polar(x,y,'y')
x=-pi:pi/80:pi; % c)
y=sin(6*x);
polar(x,y,'k')
x=-pi:pi/80:pi; % d)
y=cos(8*x);
polar(x,y,'g')
x=-pi:pi/80:pi; % e)
y=sqrt(5*cos(2*x));
polar(x,y,'b')