pcm.m

来自「语音PCM编码」· M 代码 · 共 28 行

M
28
字号
%readwav
cd('e:/yin');
s=wavread('kesu');
s1=lianghua(s);
s2=bianma(s1);
s3=jiema(s2);
s4=jieyasuo(s3);
%writewav;
cd('e:/yin');
wavwrite(s4,'rewritecp');
Y=fft(s,5167);
Pyy=Y.*conj(Y)/5167;
Y4=fft(s4,5167);
Pyy4=Y4.*conj(Y4)/5167;
f=(0:2582)/5167;
figure(1)                
subplot(2,1,1)
plot(s)
subplot(2,1,2)
plot(s4)
legend('上图为入输波形','下图为输出波形')
figure(2)                
subplot(2,1,1)
plot(f,Pyy(1:2583))
subplot(2,1,2)
plot(f,Pyy4(1:2583))
legend('上图为输入频谱','下图为输出频谱')

⌨️ 快捷键说明

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