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

📄 example9.4_9.6.m

📁 these are the Mtlab functions to plot the figures in the book Communication system (by Haykin)
💻 M
字号:
%2x2 block example
rho=0.5;
rhod=rho*rho;
rhoh=rho;
rhov=rho;

sigmas=1;
Cs=sigmas*[1,rhoh,rhov,rhod;rhoh,1,rhod,rhov;rhov,rhod,1,rhoh;rhod,rhov,rhoh,1];

%DCT

U=[1,1,1,1;1,-1,1,-1;1,1,-1,-1;1,-1,-1,1]/2;
Ct=U'*Cs*U;
Ct
for (k=1:4)
   sigmat(k)=Ct(k,k);
end;
sigmat

amean=sum(sigmat)/4
gmean=(sigmat(1)*sigmat(2)*sigmat(3)*sigmat(4))^(1/4)


R0=2;
for (k=1:4)
   R(k)=R0+(log2(sigmat(k)/gmean))/2;
end;
R

Dt=gmean*2^(-2*R0)

Ds=sigmas*2^(-2*R0)

TC=Ds/Dt


R=[4,2,2,0]
Dt=sum(sigmat.*2.^(-2*R))/4


%KLT

[U,S,V]=svd(Cs)

Ct=U'*Cs*U

%predictive coding

C3=[1,rhod,rhov;rhod,1,rhoh;rhov,rhoh,1]
d=[rhoh;rhov;rhod]
a=inv(C3)*d

sigmap=sigmas-[rhoh,rhov,rhod]*a
Dp=sigmap*2^(-2*R0)

GP=Ds/Dp

⌨️ 快捷键说明

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