| Contents | Index |
mjd = mjuliandate(v)
mjd = mjuliandate(s,f)
mjd = mjuliandate(y,mo,d)
mjd = mjuliandate([y,mo,d])
mjd = mjuliandate(y,mo,d,h,mi,s)
mjd = mjuliandate([y,mo,d,h,mi,s])
mjd = mjuliandate(v) converts one or more date vectors, v, into modified Julian date, mjd. Input v can be an m-by-6 or m-by-3 matrix containing m full or partial date vectors, respectively. mjuliandate returns a column vector of m modified Julian dates. Modified Julian dates begin at midnight rather than noon and have the first two digits of the corresponding Julian date removed.
A date vector contains six elements, specifying year, month, day, hour, minute, and second. A partial date vector has three elements, specifying year, month, and day. Each element of v must be a positive double-precision number.
mjd = mjuliandate(s,f) converts one or more date strings, s, into modified Julian date, mjd, using format string f. s can be a character array where each row corresponds to one date string, or a one-dimensional cell array of strings. mjuliandate returns a column vector of m modified Julian dates, where m is the number of strings in s.
All of the date strings in s must have the same format f, which must be composed of date format symbols listed in the datestr function reference page. Formats containing the letter Q are not accepted by mjuliandate.
Certain formats may not contain enough information to compute a date number. In those cases, hours, minutes, and seconds default to 0, days default to 1, months default to January, and years default to the current year. Date strings with two-character years are interpreted to be within the 100 years centered around the current year.
mjd = mjuliandate(y,mo,d) and mjd = mjuliandate([y,mo,d]) return the decimal year for corresponding elements of the y,mo,d (year,month,day) arrays. y, mo, and d must be arrays of the same size (or any of them can be a scalar).
mjd = mjuliandate(y,mo,d,h,mi,s) and mjd = mjuliandate([y,mo,d,h,mi,s]) return the modified Julian dates for corresponding elements of the y,mo,d,h,mi,s (year,month,day,hour,minute,second) arrays. The six arguments must be arrays of the same size (or any of them can be a scalar).
Calculate the modified Julian date for May 24, 2005:
mjd = mjuliandate('24-May-2005','dd-mmm-yyyy')
mjd =
53514Calculate the modified Julian date for December 19, 2006:
mjd = mjuliandate(2006,12,19) mjd = 54088
Calculate the modified Julian date for October 10, 2004, at 12:21:00 p.m.:
mjd = mjuliandate(2004,10,10,12,21,0) mjd = 5.3289e+004
This function is valid for all common era (CE) dates in the Gregorian calendar.
The calculation of modified Julian date does not take into account leap seconds.
decyear | juliandate | leapyear

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |