fmincon linear inequality constraint

1 回表示 (過去 30 日間)
Yigit Berkay Bozkurt
Yigit Berkay Bozkurt 2019 年 7 月 18 日
Hello,
I am using fmincon to search for minimum of function f(x)
How can I define a linear inequality constraint, that also has the x from objective function with a constant and a Matrix?
I want to express the constraint like:
x * a_matrix + a_constant ≤ 0
Thanks
Berkay

採用された回答

Walter Roberson
Walter Roberson 2019 年 7 月 18 日
A = a_matrix
b = -a_constant
and those go as the third and fourth parameters of fmincon
fmincon(objective_function, x0, A, b, ...)
  4 件のコメント
Yigit Berkay Bozkurt
Yigit Berkay Bozkurt 2019 年 7 月 18 日
It runs now. Thanks Walter!
Best Regards
Berkay

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

その他の回答 (0 件)

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by