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

📄 正弦波信源编码、译码,循环信道编码.m

📁 以正弦波信号为例
💻 M
字号:
%%%%%%%%%对正弦序列进行BPCM编码,即信源编码
predictor=[0,1];
partition=[-1:0.1:0.9];
codebook=[-1:0.1:1];
t=[0:pi/50:2*pi];
x=2*sin(3*t);%取3个周期,幅度为2的正弦曲线
xinyuancode=dpcmenco(x,codebook,partition,predictor);
decodedx=dpcmdeco(xinyuancode,codebook,predictor);
subplot(2,1,1);
plot(x-decodedx);%原码与译码的差
subplot(2,1,2);
plot(xinyuancode);%编码序列
plot(t,x,t,xinyuancode,'--',t,decodedx,'r');%原码与译码序列

%%%%%%%%%%%%%%%%%%%%%%对信源编码使用循环码进行信道编码
n=7;k=4;
xindaocode=encode(xinyuancode,n,k,'cyclic/decimal');

⌨️ 快捷键说明

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