📄 dataana.asv
字号:
%分别计算各种参数的熵率及无记忆熵
%1、计算LSP参数的熵率及无记忆熵
%生成10*2的矩阵
%n=length(findexMat);
lspMat=zeros(10,2);
sbits=[ 3 4 4 4 4 3 3 3 3 3 ];
for i=1:10;
lsprobi=prob(findexMat(i,:),2.^sbits(i));
figure(i);
lsprobtransi=probtrans(findexMat(i,:),2.^sbits(i));
lspMat(i,1)=limentr(lsprobi,lsprobtransi);
lspMat(i,2)=unmentr(lsprobi);
end
lsprob1=prob(findexMat(1,:),2.^sbits(1));
lsprob2=prob(findexMat(2,:),2.^sbits(2));
lsprob3=prob(findexMat(3,:),2.^sbits(3));
lsprob4=prob(findexMat(4,:),2.^sbits(4));
lsprob5=prob(findexMat(5,:),2.^sbits(5));
lsprob6=prob(findexMat(6,:),2.^sbits(6));
lsprob7=prob(findexMat(7,:),2.^sbits(7));
lsprob8=prob(findexMat(8,:),2.^sbits(8));
lsprob9=prob(findexMat(9,:),2.^sbits(9));
lsprob10=prob(findexMat(10,:),2.^sbits(10));
xlswrite('LSF1',lsprob1);
xlswrite('LSF2',lsprob2);
xlswrite('LSF3',lsprob3);
xlswrite('LSF4',lsprob4);
xlswrite('LSF5',lsprob5);
xlswrite('LSF6',lsprob6);
xlswrite('LSF7',lsprob7);
xlswrite('LSF8',lsprob8);
xlswrite('LSF9',lsprob9);
xlswrite('LSF10',lsprob10);
lsprobtrans1=probtrans(findexMat(1,:),2.^sbits(1));
lsprobtrans2=probtrans(findexMat(2,:),2.^sbits(2));
lsprobtrans3=probtrans(findexMat(3,:),2.^sbits(3));
lsprobtrans4=probtrans(findexMat(4,:),2.^sbits(4));
lsprobtrans5=probtrans(findexMat(5,:),2.^sbits(5));
lsprobtrans6=probtrans(findexMat(6,:),2.^sbits(6));
lsprobtrans7=probtrans(findexMat(7,:),2.^sbits(7));
lsprobtrans8=probtrans(findexMat(8,:),2.^sbits(8));
lsprobtrans9=probtrans(findexMat(9,:),2.^sbits(9));
lsprobtrans10=probtrans(findexMat(10,:),2.^sbits(10));
subplot(2,5,1),surf(lsprobtrans1);
hold on;
lspMat
%下面是求第一个基音周期的熵率及无记忆熵
% 生成2*2的矩阵,分别放熵率和无记忆熵
pitMat=zeros(2,2);
pprob1=prob(tauptrMat1,2.^8);
figure(11);
pprobtrans1=probtrans(tauptrMat1,2.^8);
pitMat(1,1)=limentr(pprob1,pprobtrans1);
pitMat(1,2)=unmentr(pprob1);
pprob2=prob(tauptrMat2,2.^6);
figure(12);
pprobtrans2=probtrans(tauptrMat2,2.^6);
pitMat(2,1)=limentr(pprob2,pprobtrans2);
pitMat(2,2)=unmentr(pprob2);
pitMat
%求自适应增益的熵率及无记忆熵
pgainMat=zeros(1,2);
gprob=prob(pindexMat,2.^5);
figure(13);
gprobtrans=probtrans(pindexMat,2.^5);
pgainMat(1,1)=limentr(gprob,gprobtrans);
pgainMat(1,2)=unmentr(gprob)
%求固定码本的熵率及无记忆熵
cbMat=zeros(1,2);
cbprob=prob(cbindexMat,2.^9);
figure(14);
cbprobtrans=probtrans(cbindexMat,2.^9);
cbMat(1,1)=limentr(cbprob,cbprobtrans);
cbMat(1,2)=unmentr(cbprob)
%求固定码本增益的熵率及无记忆熵
cgainMat=zeros(1,2);
cgprob=prob(gindexMat,2.^5);
figure(15);
cgprobtrans=probtrans(gindexMat,2.^5);
cgainMat(1,1)=limentr(cgprob,cgprobtrans);
cgainMat(1,2)=unmentr(cgprob);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -