# isbetween

Determine elements within date and time interval

## Description

`tf = isbetween(`

returns an array containing logical `t`

,`tlower`

,`tupper`

)`1`

(true) where the
corresponding element of `t`

is a `datetime`

or
`duration`

value that lies within the closed interval specified
by the corresponding elements of `tlower`

and
`tupper`

. The output `tf`

indicates which
elements of `t`

satisfy:

tlower <= t & t <= tupper

The sizes of `t`

, `tlower`

, and
`tupper`

must be the same or be compatible. If the sizes of the input
arrays are compatible, then the arrays implicitly expand to match each other. For
example, if one of `t`

, `tlower`

, or
`tupper`

is a scalar, then the scalar is compared to each
element of the other arrays. Also, vectors with different orientations (row vectors
and column vectors) implicitly expand to form a matrix.

`tf = isbetween(`

determines if elements of `t`

,`tlower`

,`tupper`

,`intervalType`

)`t`

are within the type of interval
specified by `intervalType`

. For example, if
`intervalType`

is `'open'`

, then
`isbetween`

determines which elements of `t`

satisfy `tlower < t & t < tupper`

as a condition.

## Examples

## Input Arguments

## Extended Capabilities

## Version History

**Introduced in R2014b**

## See Also

`ismember`

| `le`

| `gt`

| `lt`

| `ge`

| `datetime`

| `duration`

| `seconds`

| `caldays`

| `containsrange`

| `overlapsrange`

| `withinrange`