Between

Between[x,{min,max}]

is equivalent to minxmax.

Between[x,{{min1,max1},{min2,max2},}]

is equivalent to min1xmax1||min2xmax2||.

Between[range]

is an operator form that yields Between[x,range] when applied to an expression x.

Details

Examples

open allclose all

Basic Examples  (3)

Check that a number is included in an interval:

Use an operator form:

For symbolic expressions, the result is given as inequalities:

Select the numbers between 10 and 20, both included:

Scope  (6)

Use Between with numbers:

Use Between with numeric Quantity objects:

Use Between with dates:

Use Between with the union of several ranges:

Use Between in operator form:

Use symbolic limits:

Applications  (3)

Find the particles whose mass is in a given range:

Find surfaces with algebraic degree between 7 and 10, both included:

Find movies with runtime in a given range, returning the result as an association:

Properties & Relations  (3)

Between[x,{min,max}] includes the min, max limits:

The limits min, max in Between[x,{min,max}] are assumed to be sorted:

Use Interval objects and IntervalMemberQ instead of Between:

Alternatively, use intervals directly in Between:

Wolfram Research (2015), Between, Wolfram Language function, https://reference.wolfram.com/language/ref/Between.html.

Text

Wolfram Research (2015), Between, Wolfram Language function, https://reference.wolfram.com/language/ref/Between.html.

CMS

Wolfram Language. 2015. "Between." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Between.html.

APA

Wolfram Language. (2015). Between. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Between.html

BibTeX

@misc{reference.wolfram_2024_between, author="Wolfram Research", title="{Between}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/Between.html}", note=[Accessed: 25-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_between, organization={Wolfram Research}, title={Between}, year={2015}, url={https://reference.wolfram.com/language/ref/Between.html}, note=[Accessed: 25-November-2024 ]}