From: Lin on 28 Jul 2010 15:54 I recorded a .wav file using simulink blockes: from audio device->to audio devcie(-> to audio file). I was trying to use msspectrum to showing the averaged PSD spectrum. So I wrote this simple program: [filename,path]=uigetfile('*.wav','c:\Program Files\matlab') file=fullfile(path,filename); [y,Fs,nbits]=wavread(file); h2 = spectrum.periodogram('hamming'); hopts = psdopts(h2,y); % Default options based on the signal x set(hopts,'Fs',Fs,'SpectrumType','onesided','CenterDC',false); msspectrum(h2,y,hopts) it turned with the following erros: ??? Error using ==> times Matrix dimensions must agree. Error in ==> computeperiodogram at 55 xw = x.*win; Error in ==> periodogram at 116 [Sxx,w] = computeperiodogram(x,win,nfft,esttype,Fs); Error in ==> spectrum.periodogram.thismsspectrum at 16 [Sxx W] = periodogram(x,... Error in ==> spectrum.periodogram.msspectrum at 16 [Sxx W] = thismsspectrum(this,x,opts); Error in ==> Untitled2 at 11 msspectrum(h2,y,hopts) Anyone has any idea what was the problem?
|
Pages: 1 Prev: Extracting data from a 2D surface plot in Matlab Next: create new GUI2 with data from GUI1 |