Matlab spectrogram Hann window -


my task
have signal in .wav format sampling frequency 44100hz. want power spectrum. stft hann window size 200ms , window period 50hz. frequency range forcing 0 ~ 22000hz.

my question
can want following code?

[y, fs, nbits, opts] = wavread('a.wav'); [s,f,t,p]=spectrogram(y,hanning(8820),7938,[0:100:22000],fs); 

the matrix p returned above code want, right?

further question

  1. what relationship between window size , fft size? through independent in past not sure. can provide simple answer or reference reading?
  2. i have command specgram(x, 512, 8000, hamming(80)); --- guess original purpose that:
    signal sampling frequency : 8000
    window nfft : 1024
    window period : 10ms
    actually, not sure original purpose of code, can read it?

i not think formatting spectrogram code properly.

the commands follows

 [s,f,t,p] = spectrogram(x,window,noverlap,nfft,fs) 

where x data, window hanning window, noverlap window jump, nfft fft size , fs data's sampling rate. want

 nfft = 2^nextpow2(fs*200/1000);  spectrogram(y,hanning(nfft),fs/50,nfft,fs); 

so hanning window many samples in 200ms, dependent on sampling rate.

this should window things how want, , give desired spectrogram, can use want.

as question if p want. yes return power spectrum. if that's want, sure.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -