MATLAB: How do you find the lagrange multipliers

AI Thread Summary
To find Lagrange multipliers for a quadratic program in MATLAB using quadprog, the output structure includes a field for lambda, but it may not directly provide the multipliers as expected. Instead of a straightforward list of multipliers, users often encounter matrix sizes, which can be confusing. It is important to ensure that the constraints are correctly specified, as this affects the output. The documentation and examples provided by MathWorks can clarify how to interpret the lambda output. Proper understanding of the output structure is essential for effectively utilizing Lagrange multipliers in quadratic programming.
math8
Messages
143
Reaction score
0
When I try to solve a linear program using matlab,after using linprog(f,A,b,...) I can find the Lagrange multiplier associated with the inequality constraints and the lower bound constraints by using:

lambda.ineqlin ; lambda.lower

But if I want to solve a quadratic program (using quadprog(H,f,A,b,...)), then how do I find the Lagrange multipliers?

I can see that to find the solution, you can use:
[x,feval,exitflag,output,lambda]=quadprog(H,f,A,b,...),

but the result for lambda, which I thought would give me the Lagrange multipliers, instead, itgives me a list of matrices sizes.

I don't understand that result for lambda.

How do I find the Lagrange multipliers for a quadratic program in Matlab?
 
Physics news on Phys.org
Hey math8.

This might help:

http://www.mathworks.com.au/help/toolbox/optim/ug/brkvzon.html
 
Last edited by a moderator:
Thanks!
 
Back
Top