question about lms function in matlab?

Status
Not open for further replies.

Qais Ibrahim

Newbie level 3
Joined
Dec 22, 2013
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
15
im working on lms algorithm i want to use the lms function to update my filter coefficients instead of this :"w = w + mu * u * e" any help please?
 

u can write a function yourself. follow this %%adsp question simulaation
clear all
close all
d=[1 -1 1 -1]';
noise=[-.1 0.1 0.2 0.1]';
h=2;
m=2;
w=[0 0]';
mu=0.339;
u=h.*d+noise;
for n=1:4,
if n==1,
u_use=[0 u]';
elseif n==5,
u_use=[u(n-1) 0]';
else
u_use=[u(n-1) u]';
end
d_hat=w,n)'*u_use;
err=d-d_hat;
w,n+1)=w,n)+mu*u_use*err
end
u'.*w(2,n+1)
 
thank u but i want to use precisely the lms function to update my filter coefficients instead of this line "w,n+1)=w,n)+mu*u_use*err"
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…