to k0 k17 h0 k1
to k0 k17 h2 k1
from k0 k0 d0 k1
2#输入通道:
to k0 k17 h1 k1
to k0 k17 h3 k1
from k0 k0 d1 k1
注:1#和2#的读取不能同时,前面要加开关切换。
clcclose all
clear all
a=4
f0=0.02
L=50
n=1:(L-1)
x=a.*cos(2.*pi.*f0.*n)
bit=5
range=2^5
plot(x)
interval=(a*2)/(range-1)
partition = [-a:interval:a]
interval2 = (a*2)/(range)
codebook=[-a:interval2:a]
[index quantized]= quantiz(x,partition,codebook)
plot(n,x,'x',n,quantized,'.')
legend('Original signal','Quantized signal')
%index为输出5bit输出数字信号
%下面从index到output
output=(index-16)/4
figure
plot(n,x,n,output)
legend('Original signal','Output signal')
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)