receiv1.m

来自「双音多频编解码系统」· M 代码 · 共 35 行

M
35
字号
function num =Receiv1(hn)phone='123A456B789C*0#D';fs=8000;fl=[697 770 852 941];fh=[1209 1336 1447 1633];hnr=hn(1,361:440);% figure,stem(hnr);fn=fft(hn);N=800;w0=[1:N];w=[0:N/2-1]/N*fs;ffn=abs(fn(1,1:N/2));% figure;% subplot(3,1,1),plot(ffn);% title('ffn');window=[rectwin(100);zeros(N/2-100,1)];ll=ffn.*window';ffl=w(ffn==max(ll));hh=ffn-ll;ffh=w(ffn==max(hh));% subplot(3,1,2),plot(ll);% title('ll');% subplot(3,1,3),plot(hh);% title('hh');for i=1:4    if abs(ffl-fl(i))<=fl(i)*0.03        a=i;    endendfor j=1:4    if abs(ffh-fh(j))<=fh(j)*0.03        b=j;    endendnum=phone((a-1)*4+b);

⌨️ 快捷键说明

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