www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimtablefiller/fill.m

    function [success, statusmsg] = fill(obj, pOut, pPROJ, DOWAITBAR)
%FILL Fill tables in optimization filling object
%
%   [SUCCESS, STATUSMSG] = FILL(OBJ, pOUT, pPROJ, DOWAITBAR) fills all the
%   tables that are set up in OBJ from the supplied optimization results
%   pointed at by POUT in the CAGE Project pointed at by pPROJ. DOWAITBAR
%   determines whether a progress bar will be shown (TRUE) or not (FALSE).
%   A (1-by-NTAB) logical vector indicating the success of each table
%   filling operation is returned in SUCCESS with a cell array of status
%   messages returned in STATUSMSG.
%
%   See also CGOPTIMTABLEFILLER, CGOPTIMOUTPUT/GETSOLUTION

%  Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc.


% Check to see if the tables can be filled with the supplied optimization
% results. If any of them cannot be filled, then error. This rather
% draconian approach is taken to agree with that taken in the configuration
% GUI. Here, a user will not be able to successfully leave the wizard
% unless all the tables can be filled.
[fillFactorsStatus, statusmsg] = checkFillFactors(obj, pOut, pPROJ);
if ~all(fillFactorsStatus)
    success = false(1, length(obj.tables));
    return
end

% Do the filling
[success, statusmsg] = pFill(obj, pOut, pPROJ, DOWAITBAR);