Prev: Pulse shaping + interpolation
Next: FFT in OpenCV
From: rajgerman on 19 Feb 2006 16:32 Hi Could anyone explain the Hamming window in REALLY simple terms and why it is useful and how it could be implemented in MATLAB?? I would be grateful for any response.
From: Mike Yarwood on 19 Feb 2006 16:58 "rajgerman" <rajgerman(a)msn.com> wrote in message news:Ju6dnZUigbhAfmXenZ2dneKdnZydnZ2d(a)giganews.com... > Hi > > Could anyone explain the Hamming window in REALLY simple terms and why it > is useful and how it could be implemented in MATLAB?? > > I would be grateful for any response. > http://www.math.psu.edu/local_doc/matlab/toolbox/signal/hamming.html#1557 Best of luck - Mike
From: john on 19 Feb 2006 17:07 rajgerman wrote: > Hi > > Could anyone explain the Hamming window in REALLY simple terms and why it > is useful and how it could be implemented in MATLAB?? > > I would be grateful for any response. If you have the Signal Processing Toolbox, a Hamming window of length N can be obtained from Matlab as follows: w=hamming(N) Window functions like Hamming are typically applied as a point by point multiplication to the input of an FFT to control the level of adjacent spectral artifacts that appear in the magnitude of the FFT results for the case when the input frequencies do not correspond exactly with bin centers. These artifacts are referred to as leakage. Another common use for window functions is in the design of FIR filters using the window method. In this case a sinx/x lowpass function is multiplied point by point by a window to alter the frequency response of the filter. Google returns loads of useful information about window functions. Any introductory DSP book will discuss them as well. John
From: rajgerman on 19 Feb 2006 17:25 Thanks for that information but I'm still a little confused. The thing is I have a brain signal which is an audio file which I have fast fourier transformed. Now what I have to do is apply the Hamming window to that. How would I do that using MATLAB?? It seems confusing.
From: Ikaro on 19 Feb 2006 17:34
Hi, You can think of windowing in general as a convolution in frequency domain (you are multiplying both functions in the time domain). The result of this convolution on frequency domain is that samples outside one frequency affect the amplitude value at that frequency ! Ideally you would want your window to be an impulse in frequency domain, but note that you window would require infinite points in time.Thinking in frequency domain: So the goal of windowing can be thought as two fold, where we are trying to approximate the impulse in frequency domain with finite points: 1)Make the pass region of the window as narrow as possible. 2)Attenuate the other regions as much as possible The Hanning window does #2 pretty good, and you can get #1 to desired amount by increasing sample size. The rectangular window (which is the window you actually use if you don't multiply your data signal at all) is the best one on #1 (has the narrowest pas region), but is the worst on #2 ( largest amount of leakage). Check the posts above for implementation + additional info. Let me know if this is not clear. -Ikaro |