How can i write optimal control objective with fmincon?

1 Ansicht (letzte 30 Tage)
zahra zamani
zahra zamani am 4 Okt. 2019
Kommentiert: Matt J am 4 Okt. 2019
and my constraint is:

Akzeptierte Antwort

Matt J
Matt J am 4 Okt. 2019
Bearbeitet: Matt J am 4 Okt. 2019
Same as any objective...
Knowns=[lambda1,lambda2];
Jfun=@(Unknowns) objective(Unknowns,Knowns);
fmincon(Jfun , InitialGuess,[],[],[],[],lb,ub )
function J=objective(Unknowns,Knowns)
x=Unknowns(1:N);
u=Unknowns(N+1:M);
eps=Unknowns(M+1);
lambda1=Knowns(1);
lambda2=Knowns(2);
J=lambda2*eps^2+___________;
end
  2 Kommentare
zahra zamani
zahra zamani am 4 Okt. 2019
thank you so much.
Matt J
Matt J am 4 Okt. 2019
You're welcome, but please Accept-click the answer if your question has been resolved.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Model Predictive Control Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by