How do I set my fmincon constraint parameters?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I was trying to use Lagrange multipliers to minimize this function: f(V,N,d,L) = V^2*d^2/(L*N)
given the constraints:
g1(V,N,d,L) = V*d^2*L - A = 0 g2(V,N,d,L) = r_r*N*d*L^2+4*r_l*N*d^2*L - m = 0
where r_r, r_l, A, and m are all constants.
I found that the algebra got way too complicated so I decided to try to use fmincon to optimize it.
My understanding is that I need to use fmincon like this:
x = fmincon(fun,x0,A,b)
Where A and b are a matrix and a vector that account for my constraint functions, but I don't have a clue how to set A and b so they account for the functions g1 and g2 that I've listed above. Can anyone help?
Thanks to anyone who has an answer!!!!!
0 comentarios
Respuestas (1)
Sargondjani
el 12 de Jun. de 2012
you can insert them as nonlinear constraints (as functions, see the documentation).
0 comentarios
Ver también
Categorías
Más información sobre Nonlinear Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!