step6.m

来自「f-xlms算法程序 非常有用的消噪用的程序」· M 代码 · 共 14 行

M
14
字号
xhat = x + 0.1*randn(1,ntrW);
L = 350;
muW = 0.0001;
h = adaptfilt.filtxlms(L,muW,1,Hhat);
[y,e] = filter(h,xhat,d);

%plot(n,d,'b',n,r,'g',n,e,'r');
plot(n,d,'b',n,y,'g',n,e,'r');
xlabel('Number of iterations');
ylabel('Signal value');
title('Active Noise Control Using the Filtered-X LMS Adaptive Controller');
legend('Original Noise','Anti-Noise','Residual Noise');
sound(e/max(abs(e)),Fs);

⌨️ 快捷键说明

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