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

clear all, clf, clc;

syms x h t tau mul y1 y2 y3;


x=1;
h=(0.5)*(t-tau);
mul=symmul(x,h);
y1=int(mul,tau,-1,'t');
y2=int(mul,tau,-1,1);
y3=int(mul,tau,'t-3',1);
dt=0.25;
T1=-1:dt:1;
T2=1:dt:2;
T3=2:dt:4;
Y1=(1/4)*T1.^2+(1/2)*T1+1/4;
Y2=T2;
Y3=(1/2)*T3+2-(1/4)*T3.^2;
plot(T1,Y1,T2,Y2,'b',T3,Y3,'b');
title('Convolucin de un pulso Cuadrado con un Tringulo');
grid on;
xlabel('tiempo');
ylabel('f(t)');

clear all, clf, clc;


syms x h t m tau;
x=exp(-(t-tau));
h=1;
m=symmul(x,h);
y=int(m,'tau',0,'t');
ezplot(y, 0, 7,'Color', 'b')
grid on;
xlabel('tiempo');
ylabel('f(t)');

clear all, clf, clc;


syms x h t m tau;
x=1;
h=exp(-(t-tau));
m=symmul(x,h);
y=int(m,'tau',0,'t');
ezplot(y, 0, 7,'Color', 'b')
grid on;
xlabel('tiempo');
ylabel('f(t)');

%programa para calcular la convolucion


%de dos pulsos cuadrados para el
%intervalo 0<t<1
clear all, clc, clf
syms x h t tau mul y y1;
x=1/2;
h=1;
mul=symmul(x,h);
y=int(mul,tau,0,t);

You might also like