From: Yaw on 28 Jul 2010 14:30 I used this code for ID implementation of the LMS algorithm. Can someone help me to change it to a 2D. I want to apply it to images. L = 1000; stepsize = 0.05; u = zeros(1,L); for i = 3:L u(i) = -0.1*u(i-1)+0.8*u(i-2)+sqrt(0.27)*randn(1,1); end w(1:2,1) = [0;0]; %w=zeros(2,1) for n = 1:L-3 x = [u(n+2);u(n+1)]; f(n) = u(n+3) - w(1:2,n)'*x; w(1:2,n+1) = w(1:2,n) + stepsize*x*f(n); end
|
Pages: 1 Prev: 2D LMS Algorithm Next: Use Blockproc to do something other than give me a manipulatedimage |