What is the difference between linprog and fmincon?

17 views (last 30 days)
What is the difference between linprog and fmincon?

Accepted Answer

John D'Errico
John D'Errico on 27 Nov 2015
Your question is like asking what is the difference between a snake and a rooster. The two animals are related, to the extent that both had a common ancestor. But asking what is the difference is a very broad question. There are many differences.
These two solvers solve different problem types. They use different algorithms to do so. One of them (linprog) solves linear programming problems, the other (fmincon) solves general nonlinear problems, subject to constraints, that may be linear or nonlinear.

More Answers (1)

SIARHEI SEMASHKA
SIARHEI SEMASHKA on 27 Nov 2015
Actually, I just found the similar answer: in comparison with the routine “fmincon()”, which can solve a general nonlinear optimization problem, the routine “linprog()” is made solely for dealing with a class of optimization problems having a linear objective function with linear constraints.
Source: Applied Numerical Methods Using MATLAB, by Yang, Cao, Chung, and Morris Copyright  2005 John Wiley & Sons, Inc., ISBN 0-471-69833-4

Community Treasure Hunt

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

Start Hunting!