Function long2datenum
Convert two Longs with date with format yyyymmdd and time
with format HHMM to Matlab datenum format.
CALL:
taxis = long2datenum(taxisdatum, taxistime, timeunit)
INPUT:
taxisdate: Vector of Long with format yyyymmdd.
taxistime: Vector of Long with format HHMM.
timeunit:
OUTPUT:
taxis: Vector with corresponding values in Matlab datenum format.
APPROACH:
Using the Matlab 'rem' en 'round' operators Year, Month, Day, Hour and
minute are extracted, followed by a call to datenum to get the Matlab
datenum format of the specified dates.
EXAMPLE:
taxis = long2datenum('20110327','1135');
datestr(taxis)
ans =
19-Feb-0000 00:49:00
17-Feb-0000 00:49:00
18-Feb-0000 00:49:00
18-Feb-0000 00:49:00
17-Feb-0000 00:49:00
20-Feb-0000 00:49:00
19-Feb-0000 00:49:00
24-Feb-0000 00:49:00
See also:
datenum2long