diff options
author | Harpreet | 2016-01-25 14:20:26 +0530 |
---|---|---|
committer | Harpreet | 2016-01-25 14:20:26 +0530 |
commit | b97c2cb250a9af50112302461eb032fc31a02aae (patch) | |
tree | f98dbda56443ad85f5e033beade1ed7fa19b854a /macros/fminbnd.sci | |
parent | a2d9c2bfd6eb83d1a494821176388eb312d08254 (diff) | |
download | symphony-b97c2cb250a9af50112302461eb032fc31a02aae.tar.gz symphony-b97c2cb250a9af50112302461eb032fc31a02aae.tar.bz2 symphony-b97c2cb250a9af50112302461eb032fc31a02aae.zip |
fmincon updated
Diffstat (limited to 'macros/fminbnd.sci')
-rw-r--r-- | macros/fminbnd.sci | 7 |
1 files changed, 7 insertions, 0 deletions
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) |