home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / FUNFUN.DI$ / FOPTIONS.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  1.6 KB  |  36 lines

  1. function OPTIONS=foptions(parain);
  2. %FOPTIONS Default parameters used by the optimization routines.
  3. %    In MATLAB itself:
  4. %        FMIN and FMINS.
  5. %    In the Optimization Toolbox:
  6. %        FMINU, CONSTR, ATTGOAL, MINIMAX, LEASTSQ, FSOLVE.
  7. %    The parameters are:
  8. %    OPTIONS(1)-Display parameter (Default:0). 1 displays some results
  9. %    OPTIONS(2)-Termination tolerance for X.(Default: 1e-4).
  10. %    OPTIONS(3)-Termination tolerance on F.(Default: 1e-4).
  11. %    OPTIONS(4)-Termination criterion on constraint violation.(Default: 1e-6)
  12. %    OPTIONS(5)-Algorithm: Strategy:  Not always used.
  13. %    OPTIONS(6)-Algorithm: Optimizer: Not always used. 
  14. %    OPTIONS(7)-Algorithm: Line Search Algorithm. (Default 0)
  15. %    OPTIONS(8)-Function value. (Lambda in goal attainment. )
  16. %    OPTIONS(9)-Set to 1 if you want to check user-supplied gradients
  17. %    OPTIONS(10)-Number of Function and Constraint Evaluations.
  18. %    OPTIONS(11)-Number of Function Gradient Evaluations.
  19. %    OPTIONS(12)-Number of Constraint Evaluations
  20. %    OPTIONS(13)-Number of equality constraints. 
  21. %    OPTIONS(14)-Maximum number of iterations. (Default 100*no. of variables)
  22. %    OPTIONS(15)-Used in goal attainment for special objectives. 
  23. %    OPTIONS(16)-Minimum change in variables for finite difference gradients.
  24. %    OPTIONS(17)-Maximum change in variables for finite difference gradients.
  25. %    OPTIONS(18)- Step length. (Default 1 or less). 
  26.  
  27. %    Andy Grace 7-9-90.
  28. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  29.  
  30. if nargin<1; parain = []; end
  31. sizep=length(parain);
  32. OPTIONS=zeros(1,18);
  33. OPTIONS(1:sizep)=parain(1:sizep);
  34. default_options=[0,1e-4,1e-4,1e-6,0,0,0,0,0,0,0,0,0,0,0,1e-8,0.1,0];
  35. OPTIONS=OPTIONS+(OPTIONS==0).*default_options;
  36.