www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/tidytree.m

    function tidytree
%TIDYTREE Delete all sub-models that are not best.
%
%   TIDYTREE() deletes all sub-models that are not selected as best under
%   the current node of the ModelBrowser.

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


mbH= MBrowser;
p= mbH.CurrentNode;
resp= questdlg('Where best models have been selected all sub-models will be deleted. Do you want to continue?','Clean-up Tree','Yes','No','Yes');
if strcmp(resp,'Yes')
    OK= mbH.SelectNode(xregpointer);
    if OK
        p.tidytree(mbH);
    end
    OK= mbH.SelectNode(p);
end