语音信号的FSK和PCM编码译码仿真,matlab2021a仿真测试
%% 量化
temp=round(4096*y);
v=1;
%% 编码
y_code = pcm_encode(temp);
%% 波形生成
len1=length(y_code);
samp=24; %samp扩大一倍,为了使调制后的信号波形更完整
temp1=ones(samp,1)*(abs(y_code)>=1);
temp=reshape(temp1,1,len1*samp);
%temp5=temp;
%clear temp1;
Fs1=Fs*samp;
tnrn1=[1:length(temp)]/Fs1;
fnrn1=[-length(temp)/2:length(temp)/2-1]/length(temp)*Fs1;
.............................