Demo entry 6770505

op-func

   

Submitted by Sam on Nov 13, 2018 at 16:59
Language: Matlab. Code size: 388 Bytes.

fun = @(temp) OP_LHS(N,ub,lb,temp,order);

op_ub = bin*ones(3,N);
op_lb = zeros(3,N);
options = optimoptions(@fmincon,'Algorithm','sqp','MaxIterations',8000,'MaxFunctionEvaluations',12000);
[b_temp,fval] = fmincon(fun,temp,[],[],[],[],op_lb,op_ub,[],options);

x = x + b_temp;
figure(2);
plot(x(1,:),x(2,:),'ro');hold on;
title("E = "+ fval)
grid on;xlim([-2 2]); ylim([-2 2]);

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).