solving Non Linear optimization problem with fmincon

1 Ansicht (letzte 30 Tage)
hi,
I am trying to solve the following problem
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 Kommentare
Fabio Freschi
Fabio Freschi am 13 Okt. 2019
Formally it looks correct. In fact, if you run it no error comes up.
Muhammad Kundi
Muhammad Kundi am 14 Okt. 2019
thanks..yes no errors comes

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Sai Bhargav Avula
Sai Bhargav Avula am 24 Okt. 2019
Hi,
Yes, the code correctly implements the optimization function presented.

Weitere Antworten (0)

Kategorien

Mehr zu Nonlinear Optimization finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by