Home > utilities > mjul2str.m

mjul2str

PURPOSE ^

Convert a modified Julian day to a Matlab datestr style string

SYNOPSIS ^

function strout = mjul2str(MJD,noyear)

DESCRIPTION ^

 Convert a modified Julian day to a Matlab datestr style string

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function strout = mjul2str(MJD,noyear)
0002 % Convert a modified Julian day to a Matlab datestr style string
0003 
0004 MJD = double(MJD);
0005 
0006 mjul2matlab = 678942; %difference between modified Julian day 0 and Matlab day 0
0007 if(~exist('noyear'))
0008 strout = datestr(MJD+mjul2matlab);
0009 else
0010 strout = datestr(MJD+mjul2matlab);
0011 strout = strout(1:end-5)
0012 end;

Generated on Wed 20-Feb-2019 16:06:01 by m2html © 2005