ans = logical
0
4:00 p.m. in Los Angeles occurs after 5:00 p.m. on the same day in New York.
Compare Durations
Compare two duration arrays.
A = duration([2,30,30;3,15,0])
A = 2x1 duration
02:30:30
03:15:00
B = duration([2,40,0;2,50,0])
B = 2x1 duration
02:40:00
02:50:00
A >= B
ans = 2x1 logical array
0
1
Compare a duration array to a numeric array. Elements in the numeric array are treated as a number
of fixed-length (24-hour) days.
A < [1; 1/24]
ans = 2x1 logical array
1
0
Determine if Dates and Time Are Contained Within an Interval
Use the isbetween function to determine whether values in a datetime array lie within a closed
interval.
Define endpoints of an interval.
tlower = datetime(2014,08,01)
tlower = datetime
01-Aug-2014
tupper = datetime(2014,09,01)
7 Dates and Time
7-34
Précédent

- 288/1450

Suivant