Professional Documents
Culture Documents
Comunicaciones 1
Guía de laboratorio 1
Taller de MatLab No. 1
Objetivos:
General:
Específicos:
Evidencia:
t=[-1 0 0 5];
x=[0 0 1 1];
plot(t,x, 'LineWidth', 1.5);
axis([-1 5 0 2])
xlabel('Tiempo (seg)')
ylabel('u(t)')
title('Escalón Unitario')
t=[-1 0 1 2 3 4 5];
x=[0 0 1 2 3 4 5];
plot(t,x,'LineWidth',1.5);
axis([-1 5 0 5])
xlabel('Tiempo (seg)')
ylabel('r(t)')
title('Rampa Unitaria')
3. Pulso.
%Pulso
t=[-1 0 0 2 2 3];
x=[0 0 1 1 0 0];
plot(t,x,'LineWidth',1.5);
axis([-1 5 0 2])
xlabel('Tiempo (seg)')
ylabel('x(t)')
title('Pulso')
Figura 3. Pulso
Ejercicio 1: Explicar por medio de un comentario cada una de las
líneas en el código.
4. Exponencial decreciente.
%Exponencial decreciente
t1=[-1 0 0];
x1=[0 0 10];
t2=0:0.01:5;
x2=10*exp(-3*t2);
t=[t1 t2];
x=[x1 x2];
plot(t,x,'LineWidth',1.5);
axis([-1 5 0 10])
xlabel('Tiempo (seg)')
ylabel('x(t)')
title('Exponencial Decreciente')
%Coseno amortiguado
t1=[-1 0 0];
x1=[0 0 3];
t2=0:0.01:5;
x2=3*exp(-t2).*cos(2*t2);
t=[t1 t2];
x=[x1 x2];
plot(t,x,'LineWidth',1.5);
axis([-1 5 -1 3])
xlabel('Tiempo (seg)')
ylabel('x(t)')
title('Coseno Amortiguado')
6. Coseno creciente.
%Coseno creciente
t1=[-1 0 0];
x1=[0 0 3];
t2=0:0.01:10;
x2=0.1*exp(t2).*cos(3*t2);
t=[t1 t2];
x=[x1 x2];
plot(t,x,'LineWidth',1.5);
axis([-1 10 -2000 1000])
xlabel('Tiempo (seg)')
ylabel('x(t)')
title('Coseno Creciente')
7. Diferencia de senoidales.
%Resta seno-coseno
t=-1:0.01:5;
x=2*sin(3*t-pi/2)-cos(2*t);
plot(t,x,'LineWidth',1.5);
axis([-1 5 -3 3])
xlabel('Tiempo (seg)')
ylabel('x(t)')
title('Resta Seno-coseno')
8. Diferencia de senoidales.
%Suma de senoidales
t=-1:0.01:5;
x=sin(5*t)+sin(pi*t);
plot(t,x,'LineWidth',1.5);
axis([-1 5 -2 2])
xlabel('Tiempo (seg)')
ylabel('x(t)')
title('Suma Senoidales')