constraint in fmincon

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 件)

この質問は閉じられています。

タグ

質問済み:

2011 年 5 月 19 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by