The error shows not enough input arguments when use hanning window

7 visualizaciones (últimos 30 días)
MU
MU el 6 de Abr. de 2013
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);

Respuestas (1)

Walter Roberson
Walter Roberson el 6 de Abr. de 2013
You need to pass the window width to hanning()

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by