>> a = {'A','B','A','C','D'};b = {'A'};[c1,c2] = ismember(b,a)
simply use 'find' functionc = find(a == 'A')