summaryrefslogtreecommitdiff
path: root/tests/general_tests/fminbnd/fminbnd_f.sce
blob: 96b08de04e22977f9c881fc0e2570ecc8922ff24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//Find x in R^6 such that:
// Check if a user specifies function or not

fun = [];
x1 = [1,1,1,1,1,1];
x2 = [6,6,6,6,6,6];
options=list("MaxIter", [1500], "CpuTime", [500],"TolX",[1e-6]);

//Error
//fminunc: Expected function for Objective 
//at line     148 of function fminunc called by :  
//[xopt,fopt,exitflag,output,gradient,hessian] = fminunc (fun, x0, options);

[xopt,fopt,exitflag,output,lambda] = fminbnd (fun, x1, x2, options);