function [acc] = accuracy(string1, string2)
% This function computes the degree to which the two string arguments
% string1 and string2 agree

% Count the number of agreements, and divide by the length of the longer
% string -- this will be our measure of the user's typing accuracy
acc = sum(string1(1:10) == string2(1:10)) / max(length(string1), length(string2));

end

