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

    function [exitflag, msg, stats] = getOutputInfo(cos)
%GETOUTPUTINFO Get output information for the optimization.
%   [EXITFLAG, TERMMSG] = GETOUTPUTINFO(OPTIMSTORE) returns diagnostic
%   output information from OPTIMSTORE.  EXITFLAG indicates the success
%   (EXITFLAG > 0) or failure (EXITFLAG <= 0) of the current optimization
%   run. EXITFLAG may also give some indication why the optimization
%   terminated. Any termination message set by the optimization can be
%   retrieved from TERMMSG. EXITFLAG or TERMMSG are either scalar or 
%   vectors with the size matching the number of solutions in the
%   optimization. 
%
%   [EXITFLAG, TERMMSG, OUTPUT] = GETOUTPUTINFO(OPTIMSTORE) returns in
%   addition a structure of algorithm-specific information in OUTPUT.  For
%   OUTPUT to be non-empty, the user must create it in their algorithm.
%   See the worked example and tutorial for more information on how to
%   create OUTPUT structures.
%
%   See also CGOPTIMSTORE/SETOUTPUTINFO.

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


exitflag = cos.ResultOK;
msg = cos.ResultMessage;
stats = cos.ResultStats;