function num = alfa2num(alfa)

% given a character alfa it returns the numeric equivalent
% alfa = '0' to '9' returns 0 to 9
% alfa = 'a' to 'z' returns 10 to 35

% 93/02/10 JR

num = alfa - '0';
if (num > 10)
  num = num + ('0' + 10 - 'a');
end

