From b97c2cb250a9af50112302461eb032fc31a02aae Mon Sep 17 00:00:00 2001 From: Harpreet Date: Mon, 25 Jan 2016 14:20:26 +0530 Subject: fmincon updated --- macros/fgoalattain.bin | Bin 79236 -> 79072 bytes macros/fminbnd.bin | Bin 53656 -> 53664 bytes macros/fminbnd.sci | 7 +++++++ macros/fmincon.bin | Bin 149436 -> 149444 bytes macros/fmincon.sci | 4 ++-- macros/fminimax.bin | Bin 85668 -> 85724 bytes macros/fminunc.bin | Bin 60820 -> 60828 bytes macros/fminunc.sci | 4 ++-- macros/linprog.bin | Bin 28836 -> 28828 bytes macros/linprog.sci | 3 ++- 10 files changed, 13 insertions(+), 5 deletions(-) (limited to 'macros') diff --git a/macros/fgoalattain.bin b/macros/fgoalattain.bin index 1476d8e..e4d0024 100644 Binary files a/macros/fgoalattain.bin and b/macros/fgoalattain.bin differ diff --git a/macros/fminbnd.bin b/macros/fminbnd.bin index 76db1fb..df44ca0 100644 Binary files a/macros/fminbnd.bin and b/macros/fminbnd.bin differ diff --git a/macros/fminbnd.sci b/macros/fminbnd.sci index 2ebaa8c..c9bf4cc 100644 --- a/macros/fminbnd.sci +++ b/macros/fminbnd.sci @@ -153,6 +153,13 @@ function [xopt,fopt,exitflag,output,lambda] = fminbnd (varargin) fun = varargin(1); x1 = varargin(2); x2 = varargin(3); + + + //To check whether the 1st Input argument (fun) is a function or not + if (type(fun) ~= 13 & type(fun) ~= 11) then + errmsg = msprintf(gettext("%s: Expected function for Objective (1st Parameter)"), "fmincon"); + error(errmsg); + end //Converting the User defined Objective function into Required form (Error Detectable) function [y,check] = f(x) diff --git a/macros/fmincon.bin b/macros/fmincon.bin index 3ea45b3..2e93c02 100644 Binary files a/macros/fmincon.bin and b/macros/fmincon.bin differ diff --git a/macros/fmincon.sci b/macros/fmincon.sci index 2630683..6e2d064 100644 --- a/macros/fmincon.sci +++ b/macros/fmincon.sci @@ -303,8 +303,8 @@ function [xopt,fopt,exitflag,output,lambda,gradient,hessian] = fmincon (varargin nlc = varargin(9); end - //To check whether the 1st Input argument (f) is a function or not - if (type(f) ~= 13 & type(f) ~= 11) then + //To check whether the 1st Input argument (fun) is a function or not + if (type(fun) ~= 13 & type(fun) ~= 11) then errmsg = msprintf(gettext("%s: Expected function for Objective (1st Parameter)"), "fmincon"); error(errmsg); end diff --git a/macros/fminimax.bin b/macros/fminimax.bin index c40fcce..4243455 100644 Binary files a/macros/fminimax.bin and b/macros/fminimax.bin differ diff --git a/macros/fminunc.bin b/macros/fminunc.bin index b65c851..4d67d1b 100644 Binary files a/macros/fminunc.bin and b/macros/fminunc.bin differ diff --git a/macros/fminunc.sci b/macros/fminunc.sci index 07fa92a..f39c312 100644 --- a/macros/fminunc.sci +++ b/macros/fminunc.sci @@ -152,8 +152,8 @@ function [xopt,fopt,exitflag,output,gradient,hessian] = fminunc (varargin) fun = varargin(1); x0 = varargin(2); - //To check whether the 1st Input argument(f) is a function or not - if (type(f) ~= 13 & type(f) ~= 11) then + //To check whether the 1st Input argument(fun) is a function or not + if (type(fun) ~= 13 & type(fun) ~= 11) then errmsg = msprintf(gettext("%s: Expected function for Objective "), "fminunc"); error(errmsg); end diff --git a/macros/linprog.bin b/macros/linprog.bin index b9ba12a..82e3310 100644 Binary files a/macros/linprog.bin and b/macros/linprog.bin differ diff --git a/macros/linprog.sci b/macros/linprog.sci index 4c949ba..e3e2c71 100644 --- a/macros/linprog.sci +++ b/macros/linprog.sci @@ -18,7 +18,8 @@ function [xopt,fopt,exitflag,output,lambda] = linprog (varargin) // xopt = linprog(c,A,b,Aeq,beq) // xopt = linprog(c,A,b,Aeq,beq,lb,ub) // xopt = linprog(c,A,b,Aeq,beq,lb,ub,param) - // [xopt, fopt, exitflag, output, lambda] = linprog(file) + // xopt = linprog(file) + // xopt = linprog(file,param) // [xopt,fopt,exitflag,output,lambda] = linprog( ... ) // // Parameters -- cgit