diff options
Diffstat (limited to 'tests/general_tests/fminunc/fminunc_logical1.sce')
-rw-r--r-- | tests/general_tests/fminunc/fminunc_logical1.sce | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/general_tests/fminunc/fminunc_logical1.sce b/tests/general_tests/fminunc/fminunc_logical1.sce new file mode 100644 index 0000000..54c4d7f --- /dev/null +++ b/tests/general_tests/fminunc/fminunc_logical1.sce @@ -0,0 +1,35 @@ +//Find x in R^2 such that: +// An Unbounded Example + +function y = fun(x) + y = -(x(1)^2 + x(2)^2); +endfunction +x0 = [1,2]; +options=list("MaxIter", [1500], "CpuTime", [500], "Gradient", "OFF", "Hessian", "OFF"); + +//Output +// +//Iterates diverging; problem might be unbounded. +// hessian = +// +// [] +// gradient = +// +// [] +// output = +// +// Iterations: 65 +// Cpu_Time: 0.112 +// Message: "Iterates diverging; problem might be unbounded" +// exitflag = +// +// 8 +// fopt = +// +// [] +// xopt = +// +// [] + +[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options) + |