The error shows not enough input arguments when use hanning window

조회 수: 8 (최근 30일)
MU
MU 2013년 4월 6일
i want to use welch method to do spectrum estimation, 50% overlap and divide data into 8 segment, however, when i use hanning window, the matlab always show error using hanning, specifically, it says not enough input arguments, i really do not know why, i hope someone can help me. Thanks
The code is like this
p1=0.99*(cos((88/180)*pi)+j*sin((88/180)*pi));
p11=0.99*(cos((88/180)*pi)-j*sin((88/180)*pi));
p2=0.98*(cos((92/180)*pi)+j*sin((92/180)*pi));
p22=0.98*(cos((92/180)*pi)-j*sin((92/180)*pi));
B=[1,0,0,0]; (zero)
a=[1,(-(p1+p11+p2+p22)),(p1*p11+p2*p22+(p1+p11)*(p2+p22)),-(((p1+p11)*p2*p22)+(p1*p11*(p2+p22))),p1*p11*p2*p22]; (pole)
x=randn(1,10000);
y=filter(B,a,x);
nfft=1024;
noverlap=0.5*nfft;
pxx=pwelch(y,hanning,noverlap);

답변 (1개)

Walter Roberson
Walter Roberson 2013년 4월 6일
You need to pass the window width to hanning()

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by