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)