peter-tanner.github.io/_posts/2024-08-01-Useful-Mathematica-functions-for-signal-processing-units.md

1.1 KiB

title author date categories tags
Useful Mathematica functions for signal processing units peter 2024-08-01 01:40:23 +0800
Uni
ELEC4402

I will update this as I add more functions.

Using it for the unit ELEC4402 Communication Systems

(* Signal power *)
SigPower[expr_, t_] :=
 Limit[1/(2 T) Integrate[expr, {t, -T, T}], T -> Infinity]

(* Normalized sinc function, default Sinc in Mathematica is not normalized *)
SincNorm[Infinity] := Sinc[Pi  Infinity]
SincNorm[t_?NumericQ] := Sinc[Pi  t]

(* Fourier transform, frequency in Hz *)
FTfreq[varargs__] :=
 FourierTransform[varargs,
   FourierParameters -> {0, -2*Pi}] /. {Sinc[f_] :>
    SincNorm[Simplify[f/Pi]]}

(* Inverse Fourier transform, frequency in Hz *)
IFTfreq[varargs__] :=
 InverseFourierTransform[varargs,
   FourierParameters -> {0, -2*Pi}] /. {Sinc[f_] :>
    SincNorm[Simplify[f/Pi]]}