www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregbdryroot/getBestConstraintNames.m

    function str = getBestConstraintNames( b )
%GETBESTCONSTRAINTNAMES name of boundary model for display at testplan node
%
% str = getBestConstraintNames( b )


%  Copyright 2006 The MathWorks, Inc.


best = getBestLeaves( b );
n = size( best, 2 );

str = {};

st = length(name(b))+2;
for i = 1:n
    p = best(i);
    c = p.getconstraint;
    if ~isempty( c ),
        nm = p.fullname;
        % remove root name from string
        nm = nm(st:end);
        str = [ str; {['  ', nm] } ];
    end
end

if ~isempty(str)
    str = sprintf('%s\n',str{:});
else
    str = 'None';
end