<<Calculus`FourierTransform`

$FourierFrequencyConstant=-2 Pi

Cvičení 3: Fourierova transformace

FourierTransform[DiracDelta[t],t,v]

r[t_,T_]:=1/;Abs[t]<=T;
r[t_,T_]:=0/;Abs[t]>T;

Plot[r[t,2],{t,-4,4},PlotStyle->Thickness[0.01],
PlotRange->{-0.5,1.5}]

Integrate[Exp[-2 Pi I v t],{t,-T,T}]

ComplexExpand[%]

R[v_,T_]:=Sin[2 Pi T v]/(Pi v)/;Abs[v]>0
R[v_,T_]:=2 T/;Abs[v]==0

Plot[R[v,2],{v,-2,2},PlotRange->{-1,4}]

FourierTransform[1,t,v]

a[t_,T_]:=1-Abs[t]/T/;Abs[t]<=T
a[t_,T_]:=0/;Abs[t]>T
Plot[a[t,2],{t,-4,4},PlotStyle->Thickness[0.01],PlotRange->{-0.5,1.5}]

Integrate[(1+t/T),{t,-T,0}]+
    Integrate[(1-t/T),{t,0,T}]

Integrate[(1+t/T) Exp[-2 Pi I v t],{t,-T,0}]+
    Integrate[(1-t/T) Exp[-2 Pi I t v],{t,0,T}]

ComplexExpand[%]

Simplify[%,Trig->True]

A[v_,T_]:=(Sin[Pi T v]^2)/(Pi^2 T v^2)/;Abs[v]>0
A[v_,T_]:=T/;Abs[v]==0

Plot[A[v,2.0],{v,-2,2},PlotRange->{-1,4}]

<<Calculus`FourierTransform`

$FourierFrequencyConstant=-2 Pi

Plot[UnitStep[t], {t, -5, 5}, PlotStyle -> Thickness[0.02]]

FourierTransform[UnitStep[t], t, v]

Plot[UnitStep[t + 2] - UnitStep[t - 2], {t, -5, 5}, 
      PlotStyle -> Thickness[0.02]]

r1[t_] := UnitStep[t + T] - UnitStep[t - T]

Integrate[r1[t], {t, -Infinity, Infinity}]

R1[v_] = FourierTransform[r1[t], t, v]

T = 1;

Plot[R1[v], {v, -2, 2}, PlotStyle -> Thickness[0.02], 
      PlotRange -> All]

T =. ;

t1[t_] := 
      (t)*(UnitStep[t] - UnitStep[t - T]) + T*UnitStep[t - T]\(t2[t_] := 
      \((t - T)\)*\((UnitStep[t - T] - UnitStep[t - 2*T])\) + 
        T*UnitStep[t - 2*T]		\)

tr[t_] := t1[t + T] - t2[t + T]

tr[t_] := 
      UnitStep[t + T] (t + T) + UnitStep[t - T] (t - T) - 
        2  t  UnitStep[t]

T = 1;

Plot[tr[t], {t, -5, 5}, PlotRange -> All, 
      PlotStyle -> Thickness[0.02]]

T =. ;

Integrate[tr[t], {t, -Infinity, Infinity}]

ccc = FourierTransform[tr[t], t, v]

Tr[v_] = Simplify[ccc, Trig -> True]

T = 1;

Plot[Tr[v], {v, -2, 2}, PlotStyle -> Thickness[0.02], 
      PlotRange -> All]