Main Content

The Dirichlet Function

The functiondiriccomputes the Dirichlet function, sometimes called theperiodic sincoraliased sincfunction, for an input vector or matrixx. The Dirichlet function is defined by

D ( x ) = { sin ( N x / 2 ) N sin ( x / 2 ) , x 2 π k , ( - 1 ) k ( N - 1 ) , x = 2 π k , k = 0 , ± 1 , ± 2 , ± 3 ,

where N is a user-specified positive integer. For N odd, the Dirichlet function has a period of 2 π ; for N even, its period is 4 π . The magnitude of this function is 1 / N times the magnitude of the discrete-time Fourier transform of the N -point rectangular window.

To plot the Dirichlet function between 0 and 4 π for N = 7 and N = 8 , use

x = linspace(0,4*pi,300); subplot(2,1,1) plot(x/pi,diric(x,7)) title(“N = 7”) subplot(2,1,2) plot(x/pi,diric(x,8)) title('N = 8') xlabel('x / \pi')

Figure contains 2 axes objects. Axes object 1 with title N = 7 contains an object of type line. Axes object 2 with title N = 8 contains an object of type line.

See Also

|