I need a MATLAB Script to find 6 letter string of characters that contains only letters from @#!abcdefghijkzxyuvlwprsqmnot
such that hash(string) is
154310566
function h = hash(string)h = 6;letters = '@#!abcdefghijkzxyuvlwprsqmnot';for i = 1:length(string) h = (h * 17 + find(letters == (string(i))) - 1);endend
Best Answer