viewing spectrum of an audio signal in matlab

Illustration
Maximiliano - 2021-01-14T15:37:13+00:00
Question: viewing spectrum of an audio signal in matlab

I have an audio signal (.wav) and would like to view its spectrum in matlab. Can anybody help me in this manner?

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

Read it in with wavread()

[signal,fs] = wavread('file.wav');

If signal is Nx2 (two columns), extract one of them

signal = signal(:,1);

If you have the Signal Processing Toolbox, enter

plot(psd(spectrum.periodogram,signal,'Fs',fs,'NFFT',length(signal)));


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!