Why do I receive an error when I use a multivariate inline function within the FMINUNC function in the Optimization Toolbox 2.2 (R13)?
이전 댓글 표시
I have an inline object defined in the following manner:
rs = inline('cos(x) + sin(y)', 'x', 'y');
I want to find the point where the function is minimum using the FMINUNC function in the following manner:
r = fminunc(rs, [0;1]);
The above code results in the following error:
??? Error using ==> inline/feval
Not enough inputs to inline function.
Error in ==> D:\Applications\matlab6p5\toolbox\optim\fminunc.m
On line 149 ==> f = feval(funfcn{3},x,varargin{:});
Why do I get this error? What am I doing wrong?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Solver-Based Nonlinear Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!