In[]:=
SetOptions[FourierTransform,FourierParameters{1,-1}];​​
In[]:=
​​(*Q6*)​​(*H(t)istheunitstepfunction.thereforethisisanaccumulator*)
In[]:=
​​xt[τ_]=Piecewise[{{0,τ<1||τ>3},{1,3>τ>1}}];(*INPUT*)​​ht[τ_]:=UnitStep[τ](*ImpulseResponseH(t)*)​​yt[τ_]:=Convolve[ht[x],xt[x],x,τ]​​Plot[yt[τ],{τ,-10,10},PlotRangeAll]
Out[]=
-10
-5
5
10
0.5
1.0
1.5
2.0
In[]:=
​
In[]:=
Manipulate[Show[Plot[{ht[(t-τ)],xt[τ]},{τ,-10,10},PlotRangeAll,PlotStyle{Orange,Black,Dashed},FillingBottom,​​PlotLabelStyle[StringForm["Convolved value at t = ``, y [ t ] = ``",t,N[yt[t],2]],Red,Bold,Larger]],Plot[yt[c],{c,-10,t}]],{{t,1.1},-5,7}]
Out[]=
​
t
​​​​Convolve[ht[τ],xt[τ],τ,y]
Out[]=
2
y≥3
-1+y
1<y<3
0
True
In[]:=
​​(*Plot[xt[τ]-yt[τ],{τ,-5,5},PlotRangeAll]*)