function tf = ismember(a,s,flag)
%ISMEMBER True for set member.
%   ISMEMBER(A,S) when A is a vector returns a vector containing 1 where
%   the elements of A are in the set S and 0 otherwise.
%
%   See also UNIQUE, INTERSECT, SETDIFF, SETXOR, UNION.

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.5 $  $Date: 2000/06/01 04:39:41 $

if nargin>2, error('''rows'' flag not supported for cell arrays.'); end

if ischar(a), a = cellstr(a); end
tf = ismember(char(a),char(s),'rows');
tf = reshape(tf,size(a));

