필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

constraint in fmincon

조회 수: 2 (최근 30일)
Mouloud
Mouloud 2011년 5월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
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개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by