solving Non Linear optimization problem with fmincon
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Muhammad Kundi
le 13 Oct 2019
Réponse apportée : Sai Bhargav Avula
le 24 Oct 2019
hi,
I am trying to solve the following problem
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/242423/image.jpeg)
I have written the following code for this.
objfun = @(x) (x(1)^2 -6*x(1)+x(2)^3 -3*x(2))
A=[1 ,1];
b=[1];
Aeq = [];
beq = [];
lb=[0,0];
ub=[];
x0 = [0.6, 0.4];
[x, fval] = fmincon(objfun, x0, A, b, Aeq, beq, lb, ub)
Is this code correct or are there any mistakes?
Please help.
Thanks
2 commentaires
Réponse acceptée
Sai Bhargav Avula
le 24 Oct 2019
Hi,
Yes, the code correctly implements the optimization function presented.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!