Not enough input arguments.
Show older comments
function [e,w,y]=lms(xa1,xa2,d);
w=zeros(2,1);
N=2;
M=2;
mu=0.005;
t=1:0.025:5;
s=5*sin(2*3.*t);
e=5*sin(2*50*3.*t);
u = [xa1 xa2] *error here error here error here*
xa1= sin(1.36*pi-pi/2);
xa2= -sin(1.36*pi);
d=s+e;
u=u(:);
d=d(:);
%LMS
for n=1:2
uvec=u(n:-1:1);
e(2)=d(n)-w'*uvec;
w=w+mu*uvec*conj(e(n));
end
e=e(:);
think you very much for help
1 Comment
the cyclist
on 9 Apr 2017
Please provide an example of the inputs to lms that will result in the error.
Answers (1)
Jan
on 9 Apr 2017
Posting the complete error message and the calling command would reveal the problem. I guess:
Either "xa1" or "xa2" is a function handles. Then u = [xa1 xa2] would require input arguments for the function.
It looks strange, that you overwrite the values in the next lines:
u = [xa1 xa2] *error here error here error here*
xa1 = sin(1.36*pi-pi/2);
xa2 = -sin(1.36*pi);
1 Comment
mostafa dellahi
on 10 Apr 2017
Categories
Find more on Debugging and Improving Code in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!