⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ly3.m

📁 MATLAB的程序最大熵谱法,Brug法和Levinson法MATLAB procedures maximum entropy spectrum, Brug law and the law Levin
💻 M
字号:
clear;
clc;
N=1024;
Nfft=128;
n=[0:N-1];
randn('state',0);
wn=randn(1,N);
xn=sqrt(20)*sin(2*pi*0.2*n)+sqrt(20)*sin(2*pi*0.3*n)+wn;
[Pxx1,f]=pyulear(xn,15,Nfft,1);                             %利用Levinson法进行功率谱估计,阶数为15,点数为1024
Pxx1=10*log10(Pxx1);
hold on
subplot(2,2,1);plot(f,Pxx1,'r');
xlabel('Frequency');
ylabel('Power Spectrum (dB)');
title('levinson法 order=15,N=1024');
grid on;

[Pxx2,f]=pyulear(xn,20,Nfft,1);                           %利用Levinson法进行功率谱估计,阶数为20,点数为1024
Pxx2=10*log10(Pxx2);
hold on
subplot(2,2,2);plot(f,Pxx2,'r');
xlabel('Frequency');
ylabel('Power Spectrum (dB)');
title('levinson法 order=20,N=1024');
grid on;

N=512;
Nfft=128;
n=[0:N-1];
randn('state',0);
wn=randn(1,N);
xn=sqrt(20)*sin(2*pi*0.2*n)+sqrt(20)*sin(2*pi*0.3*n)+wn;
[Pxx3,f]=pyulear(xn,15,Nfft,1);                          %利用Levinson法进行功率谱估计,阶数为15,点数为512
Pxx3=10*log10(Pxx3);
hold on
subplot(2,2,3);plot(f,Pxx3,'r');
xlabel('Frequency');
ylabel('Power Spectrum (dB)');
title('levinson法 order=15,N=512');
grid on;

[Pxx4,f]=pyulear(xn,5,Nfft,1);                          %利用Levinson法进行功率谱估计,阶数为5,点数为512
Pxx4=10*log10(Pxx4);
hold on
subplot(2,2,4);plot(f,Pxx4,'r');
xlabel('Frequency');
ylabel('Power Spectrum (dB)');
title('levinson法 order=5,N=512');
grid on;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -