Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
constraint in fmincon
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
In my function optimization fmincon, I use 600 inequalities nonlineairs and one nonlineair equality, but the solution does not satisfact bounds. my constraint function writes like this:
function [c,ceq] = nonlcon(x)
global n
for i=n+1:2*n
c(i)= abs(-100-sum(x(n+1:i)-0.075266*abs(x(n+1:i))))-600;
end
ceq= sum (x(n+1:2*n)-0.075266*abs(x(n+1:2*n)));
end
is it right ????
0 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!