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!