www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@stack/changeItem.m
function changeItem(obj, ID, newitem) %CHANGEITEM Alter an item in the stack % % CHANGEITEM(OBJ, ID, NEWITEM) alters the item associated with ID to be % NEWITEM. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isempty(ID) ItemIndex = find(obj.IDList==ID); if ~isempty(ItemIndex) obj.ObjectList{ItemIndex} = newitem; if ItemIndex==obj.nItems obj.send('TopItemChange', handle.EventData(obj, 'TopItemChange')); end end end