Adaptive LMS Algorithm MATLAB
There are several problems in your code. First, it looks like you're confusing iteration and vector indices. The computation of e should use all values of the current (delayed) data vector, filtered with the current filter coefficients. In the update equation, you subtract a scalar from a vector, which is not what you want. Again you should be using all values of the current data vector (the length of which must equal the chosen filter length).

Take a look at the Matlab code in this question (the second one in the EDIT-part). I haven't run it but it looks like it deals correctly with the vectors in the update loop.