You are on page 1of 2

Ahmed Essam 20107553

pkg load signal


ts=0.01
t=-15:ts:15
g1=(tripuls(t-4,2)).*(rectpuls(t-3.5,1))
g2=(tripuls(t-2,2)).*(rectpuls(t-2.5,1))
g3=rectpuls(t-1,2)
g4=rectpuls(t-5,2)
j=g1+g2+g3+g4

subplot(3,1,1)
plot(t,j)
ylim([0,5])

t1=(tripuls(t-4,2)).*(rectpuls(t-3.5,1))
t2=(tripuls(t-2,2)).*(rectpuls(t-2.5,1))
t3=rectpuls(t-1.5,1)
t4=rectpuls(t-4.5,1)
t5=(tripuls(t-1,2)).*(rectpuls(t-0.5,1))
t6=(tripuls(t-5,2)).*(rectpuls(t-5.5,1))
z=t1+t2+t3+t4+t5+t6

subplot(3,1,2)
plot(t,z)
ylim([0,5])

w=conv(j,z,'same')*ts
subplot(3,1,3)
plot(t,w)
ylim([0,8])

You might also like