www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@modeldev/delchild.m
function mdev=delchild(mdev,chindex) % MODELDEV/DELCHILD cleans up deletion of child at chindex % Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isnull(mdev.Data) && ~isvalid(mdev.Data) mdev.Data=xregpointer; end ch= children(mdev); if isempty(ch) || ~any(ch==mdev.BestModel) % reset bestmodel if deleted model was best mdev= BestModel(mdev,xregpointer); end xregpointer(mdev);