diff options
author | Animesh Baranawal | 2016-01-26 00:24:57 +0530 |
---|---|---|
committer | Animesh Baranawal | 2016-01-26 00:24:57 +0530 |
commit | 8efadb6d8eb346ba8939af8993569772e8982da4 (patch) | |
tree | e6eab5a1eed79eae24996d68c6c3d2befe0659ae /macros/fminimaxChecklhs.sci | |
parent | b97c2cb250a9af50112302461eb032fc31a02aae (diff) | |
download | FOSSEE-Optimization-toolbox-8efadb6d8eb346ba8939af8993569772e8982da4.tar.gz FOSSEE-Optimization-toolbox-8efadb6d8eb346ba8939af8993569772e8982da4.tar.bz2 FOSSEE-Optimization-toolbox-8efadb6d8eb346ba8939af8993569772e8982da4.zip |
Functions created, fminimax and fgoalattain logic fixed for off option
Diffstat (limited to 'macros/fminimaxChecklhs.sci')
-rw-r--r-- | macros/fminimaxChecklhs.sci | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/macros/fminimaxChecklhs.sci b/macros/fminimaxChecklhs.sci deleted file mode 100644 index 78e4013..0000000 --- a/macros/fminimaxChecklhs.sci +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2010 - DIGITEO - Michael Baudin -// -// This file must be used under the terms of the GNU LGPL license. - -function errmsg = fminimaxChecklhs ( funname , lhs , lhsset ) - // Generates an error if the number of LHS is not in given set. - // - // Calling Sequence - // errmsg = fminimaxChecklhs ( funname , lhs , lhsset ) - // - // Parameters - // funname : a 1 x 1 matrix of strings, the name of the calling function. - // lhs : a 1 x 1 matrix of floating point integers, the actual number of output arguments - // lhsset : a 1 x n or n x 1 matrix of floating point integers, the authorized number of output arguments - // errmsg : a 1 x 1 matrix of strings, the error message. If there was no error, the error message is the empty matrix. - // - // Description - // This function is designed to be used to design functions with - // variable number of output arguments. - // Notice that it is useless to call this function if the - // function definition does not use the varargout statement. - // Notice that a function as a minimum of 1 output argument. - // Last update : 29/07/2010. - // - // Examples - // // The function takes 3 input arguments and 1/2 output arguments - // function varargout = myfunction ( x1 , x2 , x3 ) - // [lhs, rhs] = argn() - // fminimaxCheckrhs ( "myfunction" , rhs , 3 : 3 ) - // fminimaxChecklhs ( "myfunction" , lhs , 1 : 2 ) - // y1 = x1 + x2 - // y2 = x2 + x3 - // varargout(1) = y1 - // if ( lhs == 2 ) then - // varargout(2) = y2 - // end - // endfunction - // // Calling sequences which work - // myfunction ( 1 , 2 , 3 ) - // y1 = myfunction ( 1 , 2 , 3 ) - // [ y1 , y2 ] = myfunction ( 1 , 2 , 3 ) - // // Calling sequences which generate an error - // [ y1 , y2 , y3 ] = myfunction ( 1 , 2 , 3 ) - // - // // The function takes 1 or 3 output arguments, but not 2 - // function varargout = myfunction ( x1 , x2 , x3 ) - // [lhs, rhs] = argn() - // fminimaxCheckrhs ( "myfunction" , rhs , 3 : 3 ) - // fminimaxChecklhs ( "myfunction" , lhs , [1 3] ) - // y1 = x1 + x2 - // y2 = x2 + x3 - // y3 = x1 + x3 - // varargout(1) = y1 - // if ( lhs == 3 ) then - // varargout(2) = y2 - // varargout(3) = y3 - // end - // endfunction - // // Calling sequences which work - // myfunction ( 1 , 2 , 3 ) - // y1 = myfunction ( 1 , 2 , 3 ) - // [ y1 , y2 , y3 ] = myfunction ( 1 , 2 , 3 ) - // // Calling sequences which generate an error - // [y1 , y2] = myfunction ( 1 , 2 , 3 ) - // - // Authors - // Michael Baudin - 2010 - DIGITEO - // - - errmsg = [] - if ( and ( lhs <> lhsset ) ) then - lhsstr = strcat(string(lhsset)," ") - errmsg = msprintf(gettext("%s: Unexpected number of output arguments : %d provided while the expected number of output arguments should be in the set [%s]."), funname , lhs , lhsstr ); - error(errmsg) - end -endfunction - - - |