资源简介

信号的功率谱香农熵和功率谱指数熵matlab 源程序

资源截图

代码片段和文件信息

%AM信号
clear
clc
t0=0.000008;                                      %定义t0信号的持续时间
tz=0.000000001;                                         %定义抽样时间
fc=100000000;                                     %定义载波频率
a=0.8;                                            %定义调制系数
fz=1/tz;                                                        
t=[0:tz:t0];                                      %定义出抽样点数据
m=sin(2*pi*10000000*t);                                     %定义信号m  
c=cos(2*pi*fc.*t);                                %载波信号  
u=(1+a*m).*c;  


am_n1=zeros(1041);                              %定义曲线条数
am_n2=zeros(1041);                              %定义曲线条数
N=10;
while(N)
for snr=-10:30 
     y=awgn(usnr);                               %加信噪比为snr的噪声
     Yi=fftshift(fft(y));
     Ei=(abs(Yi)).^2;                             %求能量
     E=sum(Ei);                                   %总能量
     Pi=Ei/E;
     H1(snr+11)=-sum(Pi.*log10(Pi));
     H2(snr+11)=sum(Pi.*exp(1-Pi));
     SNR_N(snr+11)=snr;        
end
am_n1(N:)=H1;
am_n2(N:)=H2;
N=N-1;
end
H1=mean(real(am_n1)1);
H2=mean(real(am_n2)1);

figure(22)
plot(SNR_NH1‘-b.‘);title(‘功率谱香农熵‘);
xlabel(‘SNR/dB‘);ylabel(‘H(X)‘);
hold on
figure(33)
plot(SNR_NH2‘-b.‘);title(‘功率谱指数熵‘);
xlabel(‘SNR/dB‘);ylabel(‘H(X)‘);
hold on

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1390  2014-05-25 14:44  奇异谱熵\qiyi_entropy.m

     目录          0  2014-05-25 14:37  奇异谱熵

----------- ---------  ---------- -----  ----

                 1390                    2


评论

共有 条评论