??? Error using ==> evalin Undefined function or method 'arctan' for input arguments of type 'double'.
이전 댓글 표시
I'm trying to figure out why I keep getting the error:
??? Error using ==> evalin Undefined function or method 'arctan' for input arguments of type 'double'.
I'm trying to optimize a large function with symbolic variables in it using Hessian and gradient matrices and multidimensional Newton optimization techniques (namely, x1=x0-(H(x0))^-1)*grad(f(x0))).
That error crops up at different points in running. Sometimes it happens after the first iteration; other times, it happens after 3 or 4 runs through.
The objective function is: (T-atan(((Py+Vy*k)-Psy)/((Px+Vx*k)-Psx)); where Px, Vx, Py, and Vy are the symbolic variables that are in need of optimization. The others have values being assigned to them already. The command jacobian is used to find the gradient, and then applied again to acquire the Hessian. The Hessian and Jacobian are summed 30 times with varying numbers to form a large expression. An appropriate initial guess is being used. The eval command is being used to compute the gradient and Hessian matrices with values subbed in.
Any ideas on why this error keeps occurring?
댓글 수: 2
Sean de Wolski
2011년 12월 2일
What is the string you're feeding evalin? This is why the use of evalin/eval/assignin bis recommended against because bugs are hard to catch.
Are you sure you don't have 'arctan' instead of 'atan' somewhere?
Mike E.
2011년 12월 2일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Special Values에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!