  function y = Tomorrow(x)
% x is a string of the form 'mm/dd' where mm specifies
% the month and dd specifies the day. Thus, 12/07 is
% December 7, 0101 is January 1, 0430 is April 30 etc.
% y is a string that specifies the next day.

% Get the numeric value of the month and day
  month = str2double(x(1:2));
  day   = str2double(x(4:5));

% L(k) is the number of days in month k...
  L = [31 28 31 30 31 30 31 31 30 31 30 31];
  
  if day+1<=L(month)
%     Tomorrow is in the same month
      newDay = day+1;
      newMonth = month;
  else
%     Tomorrow is in the next month
      newDay = 1;
      if month <12
          newMonth = month+1;
      else
          newMonth = 1;
      end 
  end
  
% Convert newDay to a string with a lead zero if necessary
  d = int2str(newDay);
  if length(d)==1
      d = ['0' d];
  end

% Convert newMonth to a string with a lead zero if necessary
  m = int2str(newMonth);
  if length(m)==1;
      m = ['0' m];
  end
  
  y = [m '/' d];
