www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conbase/getAllFitOptions.m

    function opts = getAllFitOptions(con)
%GETALLFITOPTIONS Get all the options for fitting a constraint to data.
%
%  OPTS = GETALLFITOPTIONS(CON)
%
%  This method should not be overloaded by any sub-classes.
%
%  See also CONBASE, CONBASE/GETSPECIALPOINTOPTIONS,
%    CONBASE/GETBOUNDARYPOINTOPTIONS, CONBASE/FINDSPECIALPOINTS.

%  Copyright 2004-2005 The MathWorks, Inc.

spo = getspecialpointoptions(  con );
bpo = getBoundaryPointOptions( con );
cfo = getConstraintFitOptions( con );

if isempty( spo ) && isempty( bpo ) && isempty( cfo ),
    % There are no fit options
    opts = [];
else
    % Use an "optimisation manager" to handle the options
    opts = contextimplementation( xregoptmgr, con, '', '', 'Constraint Fitting', @getAllFitOptions );

    opts = AddOption( opts, 'SpecialPointOptions',  spo, class( spo ), 'Special Points',  ~isempty( spo ) );
    opts = AddOption( opts, 'BoundaryPointOptions', bpo, class( bpo ), 'Boundary Points', ~isempty( bpo ) );
    opts = AddOption( opts, 'ConstraintFitOptions', cfo, class( cfo ), 'Constraint Fit',  ~isempty( cfo ) );
end

%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|