Home > utilities > mjul2matlab.m

mjul2matlab

PURPOSE ^

MJUL2MATLAB Convert a Modified Julian date to a Matlab Serial Date

SYNOPSIS ^

function [ sdOut ] = mjul2matlab( mjul )

DESCRIPTION ^

MJUL2MATLAB Convert a Modified Julian date to a Matlab Serial Date
   Trust Mathworks to use their own date standard when perfectly good ones
   already existed :-) Still, they're at least easy to convert

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ sdOut ] = mjul2matlab( mjul )
0002 %MJUL2MATLAB Convert a Modified Julian date to a Matlab Serial Date
0003 %   Trust Mathworks to use their own date standard when perfectly good ones
0004 %   already existed :-) Still, they're at least easy to convert
0005 
0006 % Modified Julian epoch starts at [1858 11 17 0 0 0]. So datenum(that)
0007 % gives the value below.
0008 
0009 sdOut = mjul + 678942;
0010 
0011 end
0012

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