function OPTIONS=foptions(parain)
%FOPTIONS Default parameters used by the optimization routines.
% In MATLAB itself:
% FMIN, FMINS and NNLS.
% In the Optimization Toolbox:
% FMINU, CONSTR, ATTGOAL, MINIMAX, LEASTSQ.

% Andy Grace 7-9-90.
% Copyright 1984-2002 The MathWorks, Inc.
% $Revision: 5.14 $ $Date: 2002/04/08 20:26:45 $

if nargin<1;
   parain = [];
 end
sizep=length(parain);
OPTIONS=zeros(1,18);
OPTIONS(1:sizep)=parain(1:sizep);
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];
OPTIONS=OPTIONS+(OPTIONS==0).*default_options;