请教高手, matlab 除噪,rls
如下程序是参照matlab官网给的代码改编的,我想用rls滤波器对声音文件进行处理,可是提示Error using ==> plus
Matrix dimensions must agree.
我正在做毕业设计,希望各位高手指教
=wavread('signal.wav'); % Input to the filter
b= fir1(31,0.5); % FIR system to be identified
=wavread('noise.wav'); % Observation noise signal
d= filter(b,1,x)+n;% Desired signal
P0 = 10*eye(32); % Initial sqrt correlation matrix inverse
lam = 0.99; % RLS forgetting factor
h = adaptfilt.rls(32,lam,P0);
= filter(h,x,d);
subplot(2,1,1); plot(1:500,);
title('System Identification of an FIR filter');
legend('Desired','Output','Error');
xlabel('time index'); ylabel('signal value');
subplot(2,1,2); stem();
legend('Actual','Estimated');
xlabel('coefficient #'); ylabel('coefficient value'); grid on;
页:
[1]