MATLAB: Fmincon linear inequality constraint

fminconMATLAB

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

Best Answer

A = a_matrix
b = -a_constant
and those go as the third and fourth parameters of fmincon
fmincon(objective_function, x0, A, b, ...)