From: Andor on
rajgerman wrote:
> 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.

If x is the brain signal, then windowing with Hamming window in Matlab
is simply

y = x.*hamming(length(x),'periodic');

Was that the question? Or is your problem that you only have access to
the FFTed brain signal X? In that case

Y = fft( ifft(X).*hamming(length(X),'periodic') ) ;

is equal to the windowed spectrum. Don't forget the 'periodic' flag for
the window function, Matlab otherwise returns asymmetric windows (which
you paradoxically specified as 'symmetric').

Regards,
Andor

From: jim on


"Clay S. Turner" wrote:

> Hello Fred,
>
> Since the Hamming window is defined in terms of cosines, the Freq domain
> version turns out to have only 3 non-zero coefs. This makes for a pretty
> easy convolution. The coefs are -0.23, 0.54, -0.23
>

Yes. But isn't it a shifted function? That is, the zero reference for
the cosine functions is the middle of the window not the start of the
windowed sequence. From the shift theorem -> The shift of half the
sequence length in the impulse domain is equal to multiplication in the
frequency domain by fs/2.

-jim

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
From: rajgerman on
>rajgerman wrote:
>> 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.
>
>If x is the brain signal, then windowing with Hamming window in Matlab
>is simply
>
>y = x.*hamming(length(x),'periodic');
>
>Was that the question? Or is your problem that you only have access to
>the FFTed brain signal X? In that case
>
>Y = fft( ifft(X).*hamming(length(X),'periodic') ) ;
>
>is equal to the windowed spectrum. Don't forget the 'periodic' flag for
>the window function, Matlab otherwise returns asymmetric windows (which
>you paradoxically specified as 'symmetric').
>
>Regards,
>Andor
>
>
Cheers Andor

I think that was really helpful.

My brain signal is y.
x = y.*hamming(length(y),'periodic');

I have also ffted the brain signal. But would it be more useful to apply a
hamming window on the normal signal or the ffted signal and why??

From: Clay S. Turner on
What Fred and I each have said, is that you may either:

1) multiply your data on a sample by sample basis by the samples comprising
the Hamming window and then FFT the product.

or


2) convolve your FFTed data with the 3 coefs -0.23, 0.54, -0.23 that are
the frequency domain version of the Hamming window. You will need to know
how your FFT orders its data so the convolution can be applied properly.

Clay



"rajgerman" <rajgerman(a)msn.com> wrote in message
news:fvGdnWpwjJP7A2TenZ2dnUVZ_tSdnZ2d(a)giganews.com...
> So are you saying that I do not need to fast fourier transform the audio
> signal, but apply the hamminng window first and the nfast fourier
> transform??
>
> Sorry guys but I'm not to familiar with these topics but thanks for your
> help.
>
> If any of you would provide me their email address I could send you the
> files to show you what I mean.


From: Clay S. Turner on

"jim" <"sjedgingN0sp"@m(a)mwt.net> wrote in message
news:1140434886_6749(a)sp6iad.superfeed.net...
>
>
> "Clay S. Turner" wrote:
>
>> Hello Fred,
>>
>> Since the Hamming window is defined in terms of cosines, the Freq domain
>> version turns out to have only 3 non-zero coefs. This makes for a pretty
>> easy convolution. The coefs are -0.23, 0.54, -0.23
>>
>
> Yes. But isn't it a shifted function? That is, the zero reference for
> the cosine functions is the middle of the window not the start of the
> windowed sequence. From the shift theorem -> The shift of half the
> sequence length in the impulse domain is equal to multiplication in the
> frequency domain by fs/2.
>
> -jim

Hello Jim,

Likewise the zero reference for the frequency domain data is also the
middle. This presents no issues. Since you have the data in total before
convolving, you can perform a zero delay operation. Just do a cyclic
convolution. One needs to be careful about the ordering of the data from the
FFT. But even in the case where one takes the FFT data (negative, DC, then
positive frequencies) and runs it through a 3 tap FIR filter with the above
coefs, the windowed result only has a 1 sample delay compared to the non
windowed data. It is all in knowing where the zero reference points are.

Clay



First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6
Prev: Pulse shaping + interpolation
Next: FFT in OpenCV