資源簡介
通信原理中pcm的均勻編碼及解碼代碼,采用的是折疊二進制碼
代碼片段和文件信息
fs=8000;%抽樣頻率
fc=100;
dt=1/fs;
t=0:dt:0.1-dt;
y=cos(2*pi*fc*t);%輸入模擬信號
subplot(311);
plot(ty);title(‘輸入信號‘);
%-----------------編碼------------------
n=length(t);
a=zeros(111*n);
for?i=1:n
????a(11*(i-1)+1)=(sign(y(i))+1)/2;
????m=10;
????b=zeros(110);
????s=round(abs(y(i))*1023);
????while?s>0
????????b(1m)=mod(s2);
????????s
- 上一篇:超全的模式識別Matlab源程序
- 下一篇:matlab 繪圖教程
評論
共有 條評論