I have two huge cells, a dictionary and a set of possible hands in scrabble. I want to compare the two and find what arrays match
myAletters = ['D','I','R','N','E','E','P'];myAletters = upper(myAletters);myAletters = int8(myAletters);myAletters = myAletters-64;hand_count=0;for i=1:length(myAletters) hand_interim_combination=nchoosek(myAletters,i); for j=1:length(hand_interim_combination(:,1)) hand_interim_permutation=perms(hand_interim_combination(j,:)); for k=1:length(hand_interim_permutation(:,1)) hand_count=hand_count+1; hand{hand_count}=hand_interim_permutation(k,:); end endendendload('myDict.mat');word_plays=ismember(hand,myDict);
Ismember won't work because it has to be strings, going one by one won't work because it takes too long. Wat do?
Best Answer