How do i write the code of lagrange multiplier in lagrange function?
조회 수: 4 (최근 30일)
이전 댓글 표시
How do i write the code of lagrange multiplier in lagrange function ? Because the lagrange multiplier is a varible ,like x,y,z.not a random value,so for example,the function i want to optimize is as below

then how do i write the matlab code of lagrage multiplier ? because there are lots of a_k and b_k,and they all should be calculated,so i can't just use "rand" to produce them.
Does anyone know how to write the code of this? or is there any reference i can refer?
댓글 수: 2
Torsten
2019년 1월 24일
Which of the K k's do you mean when you define your objective function as
min: x_k^2+y_k^2
?
채택된 답변
Stephan
2019년 1월 24일
Hi,
here is an example, which you can use to learn how you can tackle this problem in Matlab:
Best regards
Stephan
댓글 수: 1
Taiwo Fasae
2021년 10월 12일
편집: Taiwo Fasae
2021년 10월 12일
I beg to differ. That link didn't lead to a solution for dealing with nonlinear constraints in langrange multipliers. Please show me one when you find it.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!