FT of door function between \(-T/2\) and \(T/2\) (sinc function).


Prototype

static float sinc(float T, float f)

Parameters

TDoor width in time domain.
fDesired frequency for FT evaluation.

Returns

Value of the FT at frequency \(f\): \[ y = \mathcal{F}\left(\Pi_T\right)(f) \]\(\Pi_T\) being a door of width \(T\): \[ \Pi_T(t) = \begin{cases} 1 & \textrm{ if } -T/2 \leq t \leq T/2,\\ 0 & \textrm{otherwise.} \end{cases} \]

Description

Up to the scale factor \(T\), this function is nothing else as the classical sinc function: \[ \textrm{sinc}_T(f) = \frac{\sin \pi T f}{\pi f} \]

Note
Note that this function can also be interpreted as the inverse FT of a frequential door function. In this case, \(T\) must be interpreted as twice the cutt-off frequency \(f_c\), and \(f\) as the time \(t\).


Example 1: FT of temporal door of width 1 (+/- 1/2)

y = sinc(1, f);


Example 2: IFT of frequency door of width 2fc

y = sinc(2 * fc, t);

See also

sinc()