![]() One way to accomplish this is to normalize the frequency variable by. Often I like to see the multiples of more clearly along the x-axis. Now we can redo our magnitude DTFT plot with the x-axis labels. Now our frequencies start at and have a discontinuity in the middle. So the frequencies in radians corresponding to the output elements of fft are:īut we're calling fftshift to plot the magnitude of the DTFT, so we have to perform a similar shift on our frequencies: ![]() The way I always remember the frequency scaling between the DFT and the DTFT is this: the length of the DFT corresponds to That leaves us with the question of labeling the frequency axis. To get a plot from to, use the fftshift function. You can see that the output from MATLAB is one period of the DTFT, but it's not the period normally plotted, which is from The MATLAB output we're looking at, let me show a DTFT magnitude plot that shows three periods instead of just one. That's a smoother-looking curve, but it still looks quite a bit different than the DTFT magnitude plot above. You can get a finer sampling (and a much nicer-looking DTFT plot) by zero-padding. The outputs of the DFT are samples of the DTFT, and in thisĬase the sample locations just happen to align with the locations of four zeros in the DTFT. What's going on? I explained this back in my March 15 post when I discussed the relationship between the DFT and the DTFT. And why does it look like it's only got two points? Well, Wow, that's not anywhere close to the DTFT magnitude plot above. Here's a plot of the DTFT magnitude of this sequence: I described the relationship between the DFT and the DTFT in my March 15 post.įor my example I'll work with a sequence that equals 1 for and equals 0 elsewhere. That the fft computes the discrete Fourier transform (DFT). Look at how to use the fft function to produce discrete-time Fourier transform (DTFT) magnitude plots in the form you might see in a textbook. In my Fourier transform series I've been trying to address some of the common points of confusion surrounding this topic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |