diff options
Diffstat (limited to 'docal.sce')
-rw-r--r-- | docal.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docal.sce b/docal.sce new file mode 100644 index 0000000..0c28de0 --- /dev/null +++ b/docal.sce @@ -0,0 +1,15 @@ +ulink(); +exec builder.sce +exec loader.sce + + function y=f(x) + y=x(1)^2+x(2)^2; + endfunction + //Starting point, linear constraints and variable bounds + x0=[3 , 3]; + A=[1,1 ; 1,1/4 ; 1,-1 ; -1/4,-1 ; -1,-1 ; -1,1]; + b=[2;1;2;1;-1;2]; + Aeq=[1,1]; + beq=[2]; + //Calling Ipopt + [x,fval] =intfmincon(f, [3 3],[1 2],[],[]); |