📄 aaaveragenoiselms.m
字号:
function[w,J]=aaaveragenoiselms(a,b,mu,M,N,I)
%noise reduction lms filter with sine function as desired signal;
%function[w,J]=aaaveragelms(a,b,mu,M,N,I);a=controls the noise variance;
%b=controls the amplitude of the sine function;d=desired sine
%function;M=number of filter coefficients;I=number of times to be averaged;
%N=number of data;
J=zeros(1,N);
w=zeros(1,M);
k=0:N-1;
for m=1:I
x=a*randn(1,N)+b*sin(0.1*pi*k);
d=b*sin(0.1*pi*k);
for n=M:N
x1=x(n:-1:n-M+1);
y(n)=w*x1';
e(n)=d(n)-y(n);
w=w+2*mu*e(n)*x1;
end;
E(m,:)=e.^2;
end;
J=sum(E,1)/I;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -