Use MATLAB to solve both problems.
Problem: Make a plot of the DTFT magnitude, |S(w)|, versus digital frequency at 201 equally-spaced frequencies spanning the interval 0 < w < 2Ï€. Superimpose on the same graph the corresponding 10-point DFT values plotted with dot-markers (see example graph in Fig: 1(a)).
DFT and DTFT
DFT Index
Figure 1: Plots for Problem
Make the same plot, but now plot the spectra versus the DFT index; that is, the normalized frequency variable, kNw/(2Ï€), which takes the integer values k = 0, 1, ..., N-1, at the N DFT frequencies Wk (see example graph in Fig: 1(b)). Based on this plot and the fact that s(n) is real-valued, can you explain the presence of only W1, W3, and Ws in the expression in (5)?
Problem 5: Verify numerically, using the same set of frequencies W from Problem 4, that S(w) computed from (2) agrees with that computed via freqz. Moreover, verify numerically that Sk computed by (3) agrees with that computed using the MATLAB function fft.