Not enough input arguments.
显示 更早的评论
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 个评论
the cyclist
2017-4-9
Please provide an example of the inputs to lms that will result in the error.
回答(1 个)
Jan
2017-4-9
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);
类别
在 帮助中心 和 File Exchange 中查找有关 Debugging and Improving Code 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!