Can MATLAB Coder generate C code for the function 'fmincon' from Optimization Toolbox?

The Code Generation Readiness report states Yes, but the function is not listed as Supported for C and C++ Code Generation. All my attempts with MATLAB Coder have failed. Is it possible for MATLAB Coder to generate C code for 'fmincon'?

 採用された回答

Alan Weiss
Alan Weiss 2018 年 9 月 5 日
編集済み: Alan Weiss 2020 年 6 月 30 日

0 投票

Currently, fmincon does not support code generation. Sorry.
Alan Weiss
MATLAB mathematical toolbox documentation
P.S. fmincon gained code generation in R2019b

3 件のコメント

Sandeep Ramesh
Sandeep Ramesh 2019 年 7 月 29 日
So is there any alternative to it ? how can i use fmincon to do code generation if only fmincon gives me the optimal solution.
Adam Hug
Adam Hug 2019 年 7 月 29 日
Hello Sandeep,
What kind of problem(s) are you solving with fmincon and what solver (interior-point, sqp, trust-region-reflective) are you using? Are you setting specific options such as using analytical gradients?
Adam
Mary Fenelon
Mary Fenelon 2019 年 9 月 17 日
Code generation is available for fmincon starting in the R2019b release. Learn more here.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by