(How to get squared DFT?) |
|||
Line 1: | Line 1: | ||
− | + | Hello Class, before you start doing Lab2, here are some background information you might want to read:<br/> | |
+ | http://en.wikipedia.org/wiki/Window_function<br/> | ||
+ | http://en.wikipedia.org/wiki/Spectral_density<br/> | ||
+ | http://en.wikipedia.org/wiki/Orthogonal_transformation<br/> | ||
− | Anyone have an idea of how to compute the squared DFT magnitude in MATLAB? Is this the sum of pixels across the window multipled by cos(n)+isin(n) where n is the location between 0-64 in the window? | + | Also as Additional Information: |
+ | http://www.mathworks.com/help/matlab/ref/mtimes.html | ||
+ | http://www.mathworks.com/help/matlab/ref/times.html | ||
+ | |||
+ | Q&A Section <br/> | ||
+ | Q: Anyone have an idea of how to compute the squared DFT magnitude in MATLAB? Is this the sum of pixels across the window multipled by cos(n)+isin(n) where n is the location between 0-64 in the window?<br/> | ||
+ | A: I would just x.^2 to be honest :)<br/> | ||
+ | |||
+ | Q: What does window function do?<br/> | ||
+ | A: Rememeber how rect goes to sinc from lab1? Everytime you sample an input segment and perform FFT, you are essentially applying rectangle window to the input samples. Therefore to reduce the effect of artifacts, people apply different type of windows before applying orthogonal transforms. |
Revision as of 18:38, 22 January 2013
Hello Class, before you start doing Lab2, here are some background information you might want to read:
http://en.wikipedia.org/wiki/Window_function
http://en.wikipedia.org/wiki/Spectral_density
http://en.wikipedia.org/wiki/Orthogonal_transformation
Also as Additional Information: http://www.mathworks.com/help/matlab/ref/mtimes.html http://www.mathworks.com/help/matlab/ref/times.html
Q&A Section
Q: Anyone have an idea of how to compute the squared DFT magnitude in MATLAB? Is this the sum of pixels across the window multipled by cos(n)+isin(n) where n is the location between 0-64 in the window?
A: I would just x.^2 to be honest :)
Q: What does window function do?
A: Rememeber how rect goes to sinc from lab1? Everytime you sample an input segment and perform FFT, you are essentially applying rectangle window to the input samples. Therefore to reduce the effect of artifacts, people apply different type of windows before applying orthogonal transforms.