Filtriranje in glajenje signalov

Filtracija signala f=(Subscript[χ, [-1,1]]) s sinc filtrom.

f[t_]=If[Abs[t]>1,0,1];

Plot[f[t],{t,-2,2},PlotStyle->{Blue,Thickness[0.007]},AxesStyle->Arrowheads[{0.04}],PlotRange->{-0.2,1.2}]

Convolve[Sin[a*Pi*y]/(Pi*y),f[y],y,t]

Sincf[t_,a_]=((SinIntegral[a π (1+t)]+SinIntegral[a π-a π t])/π);

Manipulate[Plot[{f[t],Sincf[t,a]},{t,-2,2},PlotStyle->{{Blue,Thickness[0.007]},{Dashed,Blue}},AxesStyle->Arrowheads[{0.04}],PlotRange->{-0.2,1.2}],
{{a,5,"λ"},5,20,5,Appearance->"Labeled"}
]

Filtracija signala f=(Subscript[χ, [-1,1]]) z Gaussovim filtrom.

f[t_]=If[Abs[t]>1,0,1];

Plot[f[t],{t,-2,2},PlotStyle->{Blue,Thickness[0.007]},AxesStyle->Arrowheads[{0.04}],PlotRange->{-0.2,1.2}]

Convolve[a/Sqrt[Pi]E^(-a^2*y^2),f[y],y,t]

Gaussf[t_,a_]=1/2 (-Erf[a (-1+t)]+Erf[a (1+t)]);

Manipulate[Plot[{f[t],Gaussf[t,a]},{t,-2,2},PlotStyle->{{Blue,Thickness[0.007]},{Dashed,Blue}},AxesStyle->Arrowheads[{0.04}],PlotRange->{-0.2,1.2}],
{{a,5,"a"},5,20,5,Appearance->"Labeled"}
]

Primer filtracije slike z Gaussovim filtrom (dostopen v pomoči programa Mathematica).

GaussianFilter[,1]

Glajenje popačenega signala f(t)=1-(t^2) na intervalu [-1,1] s sinc filtrom.

f1[x_,a_]=If[x<a,x,2a-x];

f2[x_,a_]=f1[x-Floor[x,2a],a];

g[x_]=If[Abs[x]>1,0,1-x^2];

k[x_]=If[Abs[x]>1,0,g[x]+3f2[x,0.03]];

Plot[k[x],{x,-3,3},PlotStyle->Blue,PlotRange->{{-3,3},{0,1.2}},AxesStyle->Arrowheads[{0.04}]]

s=Table[{i/20,NIntegrate[Sin[Pi*x]/(Pi*x)k[i/20-x],{x,-Infinity,Infinity}]},{i,-30,30}];

Plot[Interpolation[s][x],{x,-1.5,1.5},PlotStyle->Blue,PlotRange->{{-3,3},{0,1.2}},AxesStyle->Arrowheads[{0.04}]]