function y=mydate2yr(x);
% MYDATE2YR(X)  converts mydate format to decimal years
%               mydate format is "dy mon year, day:hr:mn:sc.dec"
%                                 0        1         2
%                                 12345678901234567890123456789

yeardays=365; if ~rem(x(8:11),4), yeardays=366; end

y = str2num(x(10:11)) + ...
    str2num(x(14:16)) / yeardays + ...
    str2num(x(18:19)) / yeardays / 24 + ...
    str2num(x(21:22)) / yeardays / 24 / 60 + ...
    str2num(x(24:25)) / yeardays / 24 / 60 / 60;
