Failed to eliminate a call to the MATLAB function 'quadprog'.

Hi,
I'm using the Matlab 2011b, and I want to generate the function 'quadprog' provided by "Optimization Toolbox"into C code. Part of my script(.m) is as follows:
coder.extrinsic('quadprog');
x = zeros(3,1);
x=quadprog(H1,C1,A1,B1,[],[],LB1,UB1);
But, I got the error like that:
Failed to eliminate a call to the MATLAB function 'quadprog'. For non-simulation builds, calls to unsupported MATLAB functions are eliminated if they do not affect function outputs.
Thank you.

 採用された回答

Titus Edelhofer
Titus Edelhofer 2012 年 1 月 4 日

0 投票

Hi,
taking a look at the list of supported functions it looks as if quadprog can not be used for code generation with MATLAB Coder.
Titus

2 件のコメント

Jie Yang
Jie Yang 2012 年 1 月 4 日
Could you give me some advices on how to reliaze the 'quadprog' function in C code?
Titus Edelhofer
Titus Edelhofer 2012 年 1 月 4 日
Writing this from scratch will not be a too simple task. I would try netlib.org or google to find something. Otherwise probably the "Numerical Recipies in C" will contain some code.

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

その他の回答 (1 件)

Mike Hosea
Mike Hosea 2012 年 1 月 10 日

0 投票

I agree with Titus, but if you can share it, I would be very interested to hear more about your application. Are you going to generate code for an embedded system?

カテゴリ

ヘルプ センター および File Exchange で MATLAB Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by