Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

constraint in fmincon

2 views (last 30 days)
Mouloud
Mouloud on 19 May 2011
Closed: MATLAB Answer Bot on 20 Aug 2021
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 ????

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!