summaryrefslogtreecommitdiff
path: root/macros/fmincon.sci
diff options
context:
space:
mode:
authorHarpreet2016-02-04 15:36:02 +0530
committerHarpreet2016-02-04 15:36:02 +0530
commitd5a0869a7d1482b67f3fd42805948ee30a05eb1e (patch)
tree62473a6b370aca4d71728000cde041391850e067 /macros/fmincon.sci
parent9f3ca8b98840ba9dd78ad62dfef0653aedb1d4b1 (diff)
downloadFOSSEE-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.sci12
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