yule walker Psd of .Wav file

hi i m new to matlab.i m trying to obtain 4th order yule walker psd estimate of a wav file ,using pyulear command but it is generating error message every time.
[b1, f] = wavread('bcopy.wav');
>> [Pxx fs] = pyulear(b1,4)
??? Error using ==> aryule at 29
X must be a vector with length greater or equal to the model order.
Error in ==> arspectra at 75 [a,v] = feval(method,x,p);
Error in ==> pyulear at 65 [Pxx,freq,msg,units,Sxx,options] = arspectra(method,x,p,varargin{:});
plss help me with this.

 채택된 답변

Wayne King
Wayne King 2012년 3월 7일

0 개 추천

You want to just input one column vector and not the matrix
b1 = b1(:,1);
[Pxx fs] = pyulear(b1,4);

댓글 수: 2

777
777 2012년 3월 7일
well i got the result but i did'nt understand it.
Wayne King
Wayne King 2012년 3월 7일
because your audio file was 2-channel but pyulear only works on vectors, it was interpreting the column dimension of your matrix as the vector length and complaining that it was only 2 while you were asking for a model of length 4

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Wayne King
Wayne King 2012년 3월 7일

0 개 추천

What is the length of b1? is it only three samples in length? or empty?
You have the model order of 4 but apparently your input b1 is less in length than that.

댓글 수: 1

777
777 2012년 3월 7일
while using waveread i have not specified anything about sample size .does the error here mean default sample size is less than 4.???workspace shows the value of b1 as <71680x2 double>

댓글을 달려면 로그인하십시오.

질문:

777
2012년 3월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by