📄 exa4_21.m
字号:
% exa4-21_lpc.m , for example 4-21
% Design lpc DF
clear all;
randn('state',0);
noise = randn(50000,1); % Normalized white Gaussian noise
x = filter(1,[1 1/2 1/3 1/4],noise);
x = x(45904:50000);
a = lpc(x,3);
est_x = filter([0 -a(2:end)],1,x); % Estimated signal
e = x - est_x; % Prediction error
[acs,lags] = xcorr(e,'coeff'); % ACS of prediction error
plot(1:97,x(4001:4097),1:97,est_x(4001:4097),'--');
title('Original Signal vs. LPC Estimate');
xlabel('Sample Number');
ylabel('Amplitude');
grid;
legend('Original Signal','LPC Estimate')
figure(2)
plot(lags,acs);
title('Autocorrelation of the Prediction Error');
xlabel('Lags');
ylabel('Normalized Value');
grid;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -