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

    function [str, reconData] = charForSummary(obj,DS)
%CHARFORSUMMARY Template string for constraint summary
%
%   STR = CHARFORSUMMARY(OBJ) produces a template string and required data
%   for use creating a tailored constraint description in the constraint
%   summary view in CAGE. 
%
%   DS is a cgstaticdataset object if the constraint is evaluated over a
%   dataset. Otherwise it is empty.
%
%   STR is returned as the normal character string. Subclasses must
%   provide their own specific summary strings.
%
%   RECONDATA provides data required to reconstruct the string from the
%   template in the constraint summary view.
%
%   See also CHAR

%   Copyright 2007-2009 The MathWorks, Inc.

% Just return the standard character string as the template
str = char(obj);

if nargin>1 && ~isempty(DS)
   str = sprintf('%s: %s',DS.Name,str); 
end

% No specific data is required to reconstruct the constraint summary string
reconData = [];