u=input('输入数值u:')
p(1)=0
b=randn
r=0
a(2)=0
for t=2:512
p(t)=0.99*p(t-1)+(sin(800*t)+b)^2;
e(t)=4*sin(1000*t)+5*sin(800*(t+pi/3))-r;
y(t)=10*sin(800*t);
a(t+1)=a(t)+u*e(t)*y(t)/p(t);
end
for k=1:511
H(k)=a(k)*10*sin(800*(512-k));
end
r=sum(H(k));
e(t)=4*sin(1000*t)+5*sin(800*(t+pi/3))-r;
a(t+1)=a(t)+u*e(t)*y(t)/p(t);
for k=1:511
H(k)=a(k)*10*sin(800*(512-k));
end
r=sum(H(k));
e(t)=5*sin(800*(t+pi/3))-r;
plot(e)