Generate Code for quadprog

3 ビュー (過去 30 日間)
huashuai fan
huashuai fan 2021 年 1 月 4 日
コメント済み: Uday Pradhan 2021 年 1 月 8 日
The code is :
function [x,fval] = test_quadp
H = [1,-1,1
-1,2,-2
1,-2,4];
f = [2;-3;1];
lb = zeros(3,1);
ub = ones(size(lb));
Aeq = ones(1,3);
beq = 1/2;
x0 = zeros(3,1);
opts = optimoptions('quadprog','Algorithm','active-set');
[x,fval] = quadprog(H,f,[],[],Aeq,beq,lb,ub,x0,opts)
When I type the command : codegen -config:mex test_quadp.
it will shows error:Function 'optimoptions' not supported for code generation.
I have updated matlab to 2020b, why this problem still occurs.
Thanks.
  1 件のコメント
Uday Pradhan
Uday Pradhan 2021 年 1 月 8 日
Hi,
What was the previous version of MATLAB that you were using? Also, could you attach a screenshot of the output of "ver" command here? Thanks!

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeParticle Swarm についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by