FFT i sploty - ćwiczenia 2

SetDirectory[NotebookDirectory[]]

Transformata Fouriera funkcji sinus

Plot[Sin[t],{t,-10,10}]

FourierTransform[Sin[ω0 t],t, ω]

ft=Table[Sin[t],{t,-10,10,0.5}]

ListPlot[ft]

fw=Fourier[ft]

ListLinePlot[Abs[fw],PlotRange->All]

mfft=Manipulate[
(ft=Table[Sin[ w  t],{t,0,50,0.5}];
fw=Fourier[ft];
ListPlot[Re[ft], ImageSize->300]
ListLinePlot[Abs[fw],PlotRange->All,ImageSize->300]),
{w,0.01,10}]

Export["02-fftsin2.avi",mfft]

Convolve[Exp[-t^2/τ^2],Sin[w t],t,T]

Plot[HeavisideTheta[t+τ/2] HeavisideTheta[τ/2-t]/.τ->2, {t,-5,5}]

Rect[t_,τ_]:=HeavisideTheta[t+τ/2] HeavisideTheta[τ/2-t];

Convolve[HeavisideTheta[t+τ/2] HeavisideTheta[τ/2-t], Exp[-t^2/τ2^2],t,T]

m1=Manipulate[Plot[(1/2) (Sqrt[π]) τ2 (Erf[((-2 T+τ)/(2 τ2))]+Erf[((2 T+τ)/(2 τ2))]) HeavisideTheta[τ]/.{τ-> 1},{T,-5,5},PlotRange->All],{τ2,0.001,3}]

Export["02-splot1.avi",m1]

Convolve[Exp[-t^2/τ^2],Exp[-t^2/τ2^2],t,T]

Convolve[Rect[t-4,1]+Rect[t-2,1]+Rect[t,1]+Rect[t+2,1]+Rect[t+4,1], Exp[-t^2/τ2^2],t,T]

m=Manipulate[Plot[(1/2) (Sqrt[π]) τ2 (-Erf[((3-2 T)/(2 τ2))]+Erf[((5-2 T)/(2 τ2))])+(1/2) (Sqrt[π]) τ2 (-Erf[((7-2 T)/(2 τ2))]+Erf[((9-2 T)/(2 τ2))])+(1/2) (Sqrt[π]) τ2 (Erf[((1-2 T)/(2 τ2))]+Erf[((1+2 T)/(2 τ2))])+(1/2) (Sqrt[π]) τ2 (-Erf[((3+2 T)/(2 τ2))]+Erf[((5+2 T)/(2 τ2))])+(1/2) (Sqrt[π]) τ2 (-Erf[((7+2 T)/(2 τ2))]+Erf[((9+2 T)/(2 τ2))]),{T,-10,10},PlotRange->All],{τ2,0.001,5}]

Export["02splot2.avi",m]