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

📄 3.m

📁 通原实验课的作业
💻 M
字号:
close all 
clear all
echo on
t=0:0.001:2;
a(1:length(t)/2)=t(1:length(t)/2);
a(length(t)/2:length(t))=-t(length(t)/2:length(t))+2;%信号样本序列 
figure(1)
plot(t,a);
title('信源序列')

mu=255;
figure(2)
[sqnr,a_quan,code]=mula_pcm(a,8,mu);%
sqnr
plot(a,a_quan,'-');%
title(' 非均匀量化级数为8的输入输出关系')

figure(3)
[sqnr,a_quan,code]=mula_pcm(a,16,mu);%
sqnr
plot(a,a_quan,'-');%
title(' 非均匀量化级数为16的输入输出关系')

figure(4)
[sqnr,a_quan,code]=mula_pcm(a,64,mu);%
sqnr
plot(a,a_quan,'-');%
title(' 非均匀量化级数为64的输入输出关系')

figure(5)
mu=255;
[sqnr,a_quan,code]=mula_pcm(a,8,mu);%
f=a-a_quan;                 %
subplot(3,1,1);
%axis([0 500 -15 15]);
plot(t,f,'-');
title('非均匀PCM量化误差,从上到下量化级数分别为8,16,64,')

[sqnr,a_quan,code]=mula_pcm(a,16,mu);%
f=a-a_quan;                 %
subplot(3,1,2);
%axis([0 500 -15 15]);
plot(t,f,'-');


[sqnr,a_quan,code]=mula_pcm(a,64,mu);%
f=a-a_quan;                 %
subplot(3,1,3);
%axis([0 500 -15 15]);
plot(t,f,'-');

⌨️ 快捷键说明

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