function [TF,LOC]=ismemberi(set1,set2,use_rows) Same as ismember.m but case insensitive David Groppe
0001 function [TF,LOC]=ismemberi(set1,set2,use_rows) 0002 %function [TF,LOC]=ismemberi(set1,set2,use_rows) 0003 % 0004 % Same as ismember.m but case insensitive 0005 % 0006 % David Groppe 0007 0008 if nargin<2, 0009 error('You need at least two arguments.'); 0010 end 0011 0012 if nargin<3, 0013 [TF, LOC]=ismember(lower(set1),lower(set2)); 0014 else 0015 [TF, LOC]=ismember(lower(set1),lower(set2),'rows'); 0016 end