mjul2str.m 323 Bytes
Newer Older
Pierre Cazenave's avatar
Pierre Cazenave committed
1 2 3 4 5 6 7 8 9 10
function strout = mjul2str(MJD,noyear)
% Convert a modified Julian day to a Matlab datestr style string 

mjul2matlab = 678942; %difference between modified Julian day 0 and Matlab day 0
if(~exist('noyear'))
strout = datestr(MJD+mjul2matlab);
else
strout = datestr(MJD+mjul2matlab);
strout = strout(1:end-5)
end;