matlab - How can I write the following nonlinear constraint optimization as nonlcon in fmincon? -


i want solve following optimization problem fmincon in matlab, can not define non-linear constraint. enter image description here

k=e(ρ(z)) , c=1 , t=5 , z=randn; r_t=ab(:,t); 

my loss function ρ 2 criterion functions , c constant. have written piece of code follows.

x0=[0 0 0 0]';%'// ab=[ 0.0181   -0.0041    0.0040    0.0373    0.0580    0.0009    0.0250   -0.0009    0.0205    0.0302      0.0290    0.0260    0.0260   -0.0234    0.0250   -0.0136   -0.0311   -0.0451    0.0576   -0.0288];  t=5; z=randn; f=@(x) ((1/6)*(1-(1-(x)^2)^3))*(abs(x)<=1)+(1/6)*(abs(x)>=1); k=mean(f(z));  aeq=[1 1 0 0]; beq=1; fun=@(x) x(3); x=fmincon(fun,x0,[],[],aeq,beq,[],[],nonlcon); 

please me if can.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -