summaryrefslogtreecommitdiff
path: root/tests/example1.sce
diff options
context:
space:
mode:
authorHarpreet2016-08-04 15:25:44 +0530
committerHarpreet2016-08-04 15:25:44 +0530
commit9fd2976931c088dc523974afb901e96bad20f73c (patch)
tree22502de6e6988d5cd595290d11266f8432ad825b /tests/example1.sce
downloadFOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.gz
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.tar.bz2
FOSSEE-Optim-toolbox-development-9fd2976931c088dc523974afb901e96bad20f73c.zip
initial add
Diffstat (limited to 'tests/example1.sce')
-rw-r--r--tests/example1.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/example1.sce b/tests/example1.sce
new file mode 100644
index 0000000..29d8b33
--- /dev/null
+++ b/tests/example1.sce
@@ -0,0 +1,12 @@
+// This example has been taken from the MATLAB quadprog page
+// http://in.mathworks.com/help/optim/ug/quadprog.html
+
+H = [1 -1; -1 2];
+f = [-2; -6];
+A = [1 1; -1 2; 2 1];
+b = [2; 2; 3];
+lb=[0,0];
+ub=[%inf, %inf];
+options=list('MaxIterations',1);
+
+[xopt,fopt,status,output]=intqpipopt(H,f,[],A,b,[],[],lb,ub,[],options)