Using "quadprog" in function "optimoptions"

조회 수: 5 (최근 30일)
Elinor Ginzburg
Elinor Ginzburg 2025년 7월 3일
답변: Elinor Ginzburg 2025년 7월 7일
Hello,
I hope this is a legitimate question, unfortunately I am unable to attach the MATLAB files.
I am using in my code the function "optimoptions" in the following way:
opts = optimoptions('quadprog','Algorithm','interior-point-convex','OptimalityTolerance',1e-8,'ConstraintTolerance',1e-8);
and I recieve the following error:
Error using optimoptions (line 124)
Invalid solver specified. Provide a solver name or handle (such as 'fmincon' or @fminunc).
Type DOC OPTIMOPTIONS for a list of solvers.
Error in compute_NE (line 78)
opts = optimoptions('quadprog','Algorithm','interior-point-convex','OptimalityTolerance',1e-8,'ConstraintTolerance',1e-8);
I know the code works (my collaborator was able to run it easily, but he has a much older version of MATLAB, while I have the 2024b)
I believe that due to verison upgrade, the behavior of either "quadprog" or "optimoptions" has changes, and thus I am unable to run it.
How can I ensure "optimoptions" treats "quadprog" as a solver?
Thank you in advance for your time and cosideration.
  댓글 수: 5
Walter Roberson
Walter Roberson 2025년 7월 3일
If we run it here in the online environment (R2024b),
Huh, I assumed that MATLAB Answers and MATLAB Online had been updated to R2025a, but it looks like they have not been!
Matt J
Matt J 2025년 7월 3일
Huh, I assumed that MATLAB Answers and MATLAB Online had been updated to R2025a, but it looks like they have not been!
Good thing. We've been seeing lots of problems with R2025a.

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

채택된 답변

Altaïr
Altaïr 2025년 7월 7일
편집: Altaïr 2025년 7월 7일
A similar issue was observed when generating a standalone executable for a script that uses the "contopptraj" function from the Robotics System Toolbox. This specific bug has been resolved in R2024b. Further details are available in the following external bug report:
Make sure that the Optimization Toolbox is installed correctly or try reinstalling it. The "ver" command can be used to check the installed toolboxes.
Sharing additional information about the workflow, the versions involved, and clearer reproduction steps would assist the community in providing more focused support.

추가 답변 (1개)

Elinor Ginzburg
Elinor Ginzburg 2025년 7월 7일
Thank you everyone for your help! I appreciate it.
What fixed the problem was re-installing the Optimization Toolbox in Matlab R2024b.
All the best.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by