fmincon linear inequality constraint

1 view (last 30 days)
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

Accepted Answer

Walter Roberson
Walter Roberson on 18 Jul 2019
A = a_matrix
b = -a_constant
and those go as the third and fourth parameters of fmincon
fmincon(objective_function, x0, A, b, ...)
  4 Comments
Yigit Berkay Bozkurt
Yigit Berkay Bozkurt on 18 Jul 2019
It runs now. Thanks Walter!
Best Regards
Berkay

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!