www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@stack/getTopItem.m

    function item = getTopItem( obj )
%GETTOPITEM Return the item at the head of the stack
% 
%  ITEM = obj.getTopItem returns the item that is currently sitting at the
%  head of the stack.  IF there are no items currently in the stack an
%  empty vector is returned.

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


if obj.nItems
    item = obj.ObjectList{obj.nItems};
else
    item = [];
end