Hi,
just guessing: your DB1 is one row of your database? And you are looking for rows, in which you find both an occurrence of work and family? In this case I guess you would write
match = all(ismember({'work', 'family'}, DB1));
And if it's indeed only an example, and your DB1 would be a NxM cell array, the match would be
for i=1:size(p,1)
match_i = all(ismember({'work', 'family'}, DB1(p,:)));
end
Titus
Best Answer