viewing spectrum of an audio signal in matlab

M
Maximiliano · Jan 14, 2021 · 1.9K views
Question
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 PhD Expert
Answered Aug 24, 2026

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)));
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!