x = linprog(f, A, b)
[x, fval, exitflag, output, lambda] = linprog(f, A, b, Aeq, beq, lb, ub, options)
[x, fval, exitflag, output, lambda] = linprog(problem)
| Parameter | Description |
|---|---|
| f | linear objective coefficients. |
| A, b | linear inequality constraints A*x <= b. |
| Aeq, beq | linear equality constraints Aeq*x = beq. |
| lb, ub | lower and upper variable bounds. |
| options | solver options created with optimoptions or optimset. |
| Parameter | Description |
|---|---|
| x | computed minimizer. |
| fval | objective value f'*x. |
| exitflag | termination indicator. |
| output | diagnostic structure. |
| lambda | structure with lower, upper, ineqlin and eqlin multiplier estimates. |
linprog solves linear optimization problems with linear constraints and bounds. Nelson uses HiGHS when available.
Supported structures include f, Aineq or A, bineq or b, Aeq, beq, lb, ub, x0 and options. The output structure reports the algorithm, normalized backend status, primal solution status, message, constraint violation, iterations and first-order residual estimate. The lambda structure is filled for continuous linear programs from backend dual information.
Options such as Display, MaxTime, MaxIterations, LPMaxIterations, ConstraintTolerance, LPOptimalityTolerance, LPPreprocess and RootLPAlgorithm are converted to HiGHS options when possible. Other recognized optimization options are accepted and ignored when no backend equivalent exists.
f = [-1; -1];
A = [1 2; 4 2];
b = [4; 12];
opts = optimoptions('linprog', 'Display', 'off');
[x, fval, exitflag, output, lambda] = linprog(f, A, b, [], [], [0; 0], [], opts)
| Version | Description |
|---|---|
| 2.0.0 | initial version |