The error shows not enough input arguments when use hanning window
2 views (last 30 days)
Show older comments
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);
0 Comments
Answers (1)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!