wavread() will return the sampling frequency. Then you input the sampling frequency into periodogram() (along with the other documented inputs) to get a meaningful frequency vector as an output.
[x,Fs] = wavread('balaclava5s.wav');
[Pxx,Freq] = periodogram(x,rectwin(length(x)),length(x),Fs);
plot(Freq,10*log10(Pxx))
grid on;
xlabel('Hz'); ylabel('dB/Hz');
Just
periodogram(x,rectwin(length(x)),length(x),Fs);
produces a plot without outputting any data.
Best Answer