clc close all clear all %TP n2 fs = 10000; t = -5:1/fs:5; x1 = tripuls(t,2); x2 = rectpuls(t-3,20e-3); g = funciongt_tp2(t,1,0); d = dirac(t-3); plot(t,x1) hold plot(t,x2) %z1 = conv(x1,g,shape = "same")/fs; z1 = conv(x1,x2,shape = "same")/fs; z2 = conv(x1,x1,shape = "same")/fs; figure, plot(t,z1) %hold %plot(t,z2) %axis([-5 5 -1 2]) xlabel('Time (sec)') ylabel('Amplitude') legend("x(t)*g(t)","x(t)*x(t)")