MATLAB: Viewing spectrum of an audio signal in matlab Signal Processing Toolboxurgent Hello all, I have an audio signal (.wav) and would like to view its spectrum in matlab. Can anybody help me in this manner? Thanks in advance. Best Answer Read it in with wavread()[signal,fs] = wavread('file.wav');If signal is Nx2 (two columns), extract one of themsignal = signal(:,1);If you have the Signal Processing Toolbox, enterplot(psd(spectrum.periodogram,signal,'Fs',fs,'NFFT',length(signal))); Related SolutionsMATLAB: How to compute mffc [signal, Fs] = audioread('YourFile.wav');PLOT = true;[windowFFT, Freq] = getDFT(signal, Fs, PLOT);mfccParams = feature_mfccs_init();ceps = feature_mfccs(windowFFT, mfccParams); MATLAB: Audio cutter in matlab You can do something like this: If 1 second removed from end:[Y,FS,NBITS] = wavread('file.wav'); % Your file namenum_samp = round(FS); % Number of samples in a secwavwrite(Y(1:end-numsamp), FS,NBITS,'new_file.wav'); % if 1 second removed from endIF 1 second removed from beginning [Y,FS,NBITS] = wavread('file.wav'); % Your file name num_samp = round(FS); % Number of samples in a sec wavwrite(Y(numsamp+1:end), FS,NBITS,'new_file.wav'); Related QuestionPower spectral density via LPC
Best Answer