- 7
- 0
- 约 83页
- 2016-12-03 发布于重庆
- 举报
功-率-谱-估-计
为何讨论AR模型? M=15; %阶数 M1=20; %阶数 %求自相关函数 for m=0:M-1, % 对r赋初值 temp=0; for n=1:N-M, temp=x(n)*x(n+m)+temp; end r(m+1)=(1/N)*temp; end %%%%%%%%%%%%%根据数学模型计算功率谱 q=1; for f=0:0.001:0.5-0.001; w=2*pi*f; t=0; for i=1:p-1 t=t+a(p-1,i)*exp((-1)*j*w*i); end pxx(q)=(1/abs(1+t))^2; q=q+1; end plot(f/(2*pi),pxx,r) f=0.001:0.001:0.5; subplot(2,1,1); axis([0 0.8 -20 120]); plot(f,10*log(pxx)); title(‘自编程序’);axis([0 0.5 -20 100]) nfft=100; subplot(2,1,2); [pxx1,f1]=pyulear(x,M,nfft,fs);% MATLB自带的求解函数 axis([0 0.4999 -20 120]); plot(f1,10*log(pxx1)); title(用MATLB函数) axis(
原创力文档

文档评论(0)