summaryrefslogtreecommitdiff
path: root/exam.sce
diff options
context:
space:
mode:
authorHarpreet2016-08-31 10:22:01 +0530
committerHarpreet2016-08-31 10:22:01 +0530
commit356c6215f4872911205dcb2d155e7687ae4dd2a8 (patch)
tree63222841367ae36ed0bdf52dd30aabf8e5b21049 /exam.sce
parentd8fca69f239a275f5ffdbd870508c86b6e69c678 (diff)
downloadFOSSEE-Optim-toolbox-development-356c6215f4872911205dcb2d155e7687ae4dd2a8.tar.gz
FOSSEE-Optim-toolbox-development-356c6215f4872911205dcb2d155e7687ae4dd2a8.tar.bz2
FOSSEE-Optim-toolbox-development-356c6215f4872911205dcb2d155e7687ae4dd2a8.zip
intfminimax added and fmincon updated
Diffstat (limited to 'exam.sce')
-rw-r--r--exam.sce27
1 files changed, 0 insertions, 27 deletions
diff --git a/exam.sce b/exam.sce
deleted file mode 100644
index 819d8d6..0000000
--- a/exam.sce
+++ /dev/null
@@ -1,27 +0,0 @@
-function y = fun(x)
- y = 3*x(1)^2 + 2*x(1)*x(2) + x(2)^2 - 4*x(1) + 5*x(2) ;
-endfunction
-
-[xval, fval, status, gradient, hessian] = intfminunc(fun,[1 2],[2])
-
-x1 = [0,-5];
-x2 = [4,4];
-
-[xval, fval, status, gradient, hessian] = intfminbnd(fun,[1],x1,x2)
-
- //Find x in R^6 such that it minimizes:
- //f(x)= sin(x1) + sin(x2) + sin(x3) + sin(x4) + sin(x5) + sin(x6)
- //-2 <= x1,x2,x3,x4,x5,x6 <= 2
- //Objective function to be minimised
- function y=f(x)
- y=0
- for i =1:6
- y=y+sin(x(i));
- end
- endfunction
- //Variable bounds
- x1 = [-2, -2, -2, -2, -2, -2];
- x2 = [2, 2, 2, 2, 2, 2];
- intcon = [];
- //Options
- [x,fval] =intfminbnd(f ,intcon, x1, x2)