www.gusucode.com > mbclayouts 工具箱 matlab 源码程序 > mbclayouts/@xregcontainer/remove.m

    function  remove(obj, index)
%  Synopsis
%     function  remove(obj, index)
%
%  Description
%     Removes an item at index from the xregcontainer
%     and repacks the group.  The item is not deleted,
%     but its reference is removed from the list.
%
%  Example
%
%
%  See Also
%     Methods xregcontainer

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




elements = obj.g.elements;

len = length(elements);
if index > len
   error(message('mbc:xregcontainer:InvalidIndex'));
end

elements(index)=[];

obj.g.elements = elements;