Documente Academic
Documente Profesional
Documente Cultură
clc
t=0:0.01:0.2;
Vo=-[1+(0.5).*cos(20.*pi.*t)].*heaviside(t);
grid on
plot(t,Vo)
grid on
Convolución: la respuesta de impulso de un LTI es h (t) = e ^–( 2t u) (t). Utilice las funciones
de MATLAB para aproximar la integral de convolución cuando las entradas del sistema son:
Caso 1)
clc
close all
t=0:0.01:30;
T=0:0.01:60;
x1=cos(2*pi*t).*(heaviside(t)-heaviside(t-20));
h=exp(-2*t).*(heaviside(t));
dt=t(2)-t(1);
con=dt*conv(x1,h);
figure(1)
subplot(3,1,1)
plot(t,x1)
ylabel('x1(t)')
grid on
subplot(3,1,2)
plot(t,h)
ylabel('h(t)')
grid on
subplot(3,1,3)
plot(T,con)
grid on
ylabel('conv(x1*h)')
Caso 2:
clc
close all
t=0:0.01:5;
T=0:0.01:10;
x2=sin(pi*t).*exp(-20*t).*(heaviside(t)-heaviside(t-20));
h=exp(-2*t).*(heaviside(t));
dt=t(2)-t(1);
con=dt*conv(x2,h);
figure(1)
subplot(3,1,1)
plot(t,x2)
ylabel('x2(t)')
grid on
subplot(3,1,2)
plot(t,h)
ylabel('h(t)')
grid on
subplot(3,1,3)
plot(T,con)
grid on
ylabel('conv(x2*h)')
Caso 3:
clear all, clc, close all
t=0:0.001:5;
T=0:0.001:10;
x_3=1*(t).*(heaviside(t))-2*(t-2).*(heaviside(t-2))+1*(t-
4).*(heaviside(t-4));
h_t=exp(-2*t).*(heaviside(t));
dt=t(2)-t(1);
con=dt*conv(x_3,h_t);
subplot(3,1,1)
plot(t,x_3)
xlabel('t')
ylabel('amplitud')
title('Señal x3(t)')
grid on
subplot(3,1,2)
plot(t,h_t)
xlabel('t')
ylabel('Amplitud')
title('Señal h(t)')
grid on
subplot(3,1,3)
plot(T,con)
grid on
xlabel('T')
ylabel('convolucion(x3* h)')
title('Convulucion caso 3')