fmincon and optimization with a symbolic matrix

조회 수: 2 (최근 30일)
ali akbar
ali akbar 2020년 9월 14일
댓글: ali akbar 2020년 9월 14일
I am working on the following optimization problem
syms t [1 16]
tt=reshape(t,[4],[4]);
a=tril(tt);
chi1=trasnpose(a)*a;
chi=randn(4,4);
fun=(chi1-chi).^2;
g=matlabFunction(fun)
gs=GlobalSearch;
opts=optimoption(@fmincon,'Algorithm','interior-point');
problem = createOptimProblem('fmincon','x0',[],'objective',g,'lb',[],'ub',[],'options',opts)
and I am getting an error
Undefined function 'optimoption' for input arguments of type 'function_handle'.
opts=optimoption(@fmincon,'Algorithm','interior-point');
I read on forum that fmincon doesn't solve symbolic problem so I tried another solver 'lsqnonlin' and lsqlin, but encountering a similar problem. Any help will be appreciated.

채택된 답변

Steven Lord
Steven Lord 2020년 9월 14일
The function is optimoptions (plural) not optimoption (singular).
  댓글 수: 1
ali akbar
ali akbar 2020년 9월 14일
Einstein was right, human stupidity has no bounds. Silly me. It solved the problem.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by