how to use periodogram?
Show older comments
i want to analyse a .wav file using spectral.periodogram, but i have a trouble, what should i do?
x = wavread('balaclava5s.wav'); size(x); N = 350208; Fs = 44100; ts = 1/fs; tmax = (N-1)*ts; t = 0:ts:tmax; periodogram(x)
is it right? i'm new to digital signal processing, and i have no basic.
Accepted Answer
More Answers (1)
nah
on 2 Oct 2012
0 votes
2 Comments
Wayne King
on 2 Oct 2012
Edited: Wayne King
on 2 Oct 2012
You likely have a two-channel recording from the .wav file.
Try this
[x,Fs] = wavread('balaclava5s.wav');
x = x(:,1);
[Pxx,Freq] = periodogram(x,rectwin(length(x)),length(x),Fs);
plot(Freq,10*log10(Pxx))
grid on;
xlabel('Hz'); ylabel('dB/Hz');
Then the rest of my example.
nah
on 3 Oct 2012
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!