function valeur=timelabel(txt)
%timelabel Deduce the time unit from the first column label 
% ==========================================================
a=regexprep(txt, '.*(', '');


a=lower(a);
switch a(1)
  case 'd'
   valeur=1; %day
 case 'h'
   valeur=2; % heures
 case 'm'
   valeur=3; % mns
 otherwise
  % Unite de temps non reconnu
  errordlg(['Time unit not recognized in first column label of the data file: ', txt]);
 return; 
end
end % fin timelabel

