diff options
author | Harpreet | 2016-02-04 15:36:02 +0530 |
---|---|---|
committer | Harpreet | 2016-02-04 15:36:02 +0530 |
commit | d5a0869a7d1482b67f3fd42805948ee30a05eb1e (patch) | |
tree | 62473a6b370aca4d71728000cde041391850e067 /macros/fmincon.sci | |
parent | 9f3ca8b98840ba9dd78ad62dfef0653aedb1d4b1 (diff) | |
download | FOSSEE-Optimization-toolbox-d5a0869a7d1482b67f3fd42805948ee30a05eb1e.tar.gz FOSSEE-Optimization-toolbox-d5a0869a7d1482b67f3fd42805948ee30a05eb1e.tar.bz2 FOSSEE-Optimization-toolbox-d5a0869a7d1482b67f3fd42805948ee30a05eb1e.zip |
Source files
Diffstat (limited to 'macros/fmincon.sci')
-rw-r--r-- | macros/fmincon.sci | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/macros/fmincon.sci b/macros/fmincon.sci index 49adec5..2393649 100644 --- a/macros/fmincon.sci +++ b/macros/fmincon.sci @@ -268,15 +268,10 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin [lhs , rhs] = argn(); //To check the number of arguments given by the user - if ( rhs<4 | rhs>13 ) then - errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while it should be 4,6,8,9,10,11,12,13"), "fmincon", rhs); + if ( rhs<4 | rhs==5 | rhs==7 | rhs>10 ) then + errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while it should be 4,6,8,9,10"), "fmincon", rhs); error(errmsg) end - - if (rhs==5 | rhs==7) then - errmsg = msprintf(gettext("%s: Unexpected number of input arguments : %d provided while it should be 4,6,8,9,10,11,12,13"), "fmincon", rhs); - error(errmsg) - end //Storing the Input Parameters fun = varargin(1); @@ -862,7 +857,7 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin lambda.ineqlin (j) = lambda1(i) j= j+1; end - lambda.ineqlin = lambda.ineqlin' + lambda.ineqlin = lambda.ineqlin'; end //Converting hessian of order (1 x (numberOfVariables)^2) received from Ipopt to order (numberOfVariables x numberOfVariables) @@ -924,5 +919,4 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin break; end - endfunction |