tf = isbetween(t, lowerBound, upperBound)
tf = isbetween(t, lowerBound, upperBound, intervalType)
| Parameter | Description |
|---|---|
| inputs | Date values and lower and upper bounds, plus an optional interval type: closed, open, openleft, openright, [], (), (], or [). |
| Parameter | Description |
|---|---|
| output | A logical array. |
Test whether datetime values lie inside an interval.
The default interval is closed. Date-compatible inputs are converted with datenum before comparison.
Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.
isbetween(datetime(2024, 2, 1), datetime(2024, 1, 1), datetime(2024, 3, 1))
isbetween(datetime(2024, 1, 1), datetime(2024, 1, 1), datetime(2024, 3, 1), 'open')
| Version | Description |
|---|---|
| 2.0.0 | initial version |