www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffkeytable/containsTable.m

    function ret = containsTable(obj, varargin)
%CONTAINSTABLE Check whether a table cell exists in the datakey table
%
%  RET = CONTAINSTABLE(OBJ, R, C) returns a logical vector the same length
%  as the number of (R, C) pairs.  This vector indicates which (R, C) pairs
%  exist as table links in the data key table.

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


L = uint32(sub2ind(obj.TableSize, varargin{:}));
keys = obj.DataKeyTable(:,1);
ret = false(size(L));
for n = 1:numel(L)
    ret(n) = any(L(n)==keys);
end