Subdivide

Subdivide[n]

generates the list {0,1/n,2/n,,1}.

Subdivide[xmax,n]

generates the list of values obtained by subdividing the interval 0 to xmax into n equal parts.

Subdivide[xmin,xmax,n]

generates the list of values from subdividing the interval xmin to xmax.

Details

  • Subdivide[,n] generates a list of length n+1.

Examples

open allclose all

Basic Examples  (3)

Subdivide the unit interval into 10 equal parts:

Subdivide the interval 0 to 10 into 5 equal parts:

Subdivide the interval to 1 into 8 equal parts using machine precision:

Scope  (2)

Subdivide a symbolic interval from a to b into 6 parts:

Subdivide the interval from E to Pi using exact arithmetic:

Use arbitrary-precision arithmetic starting with 21 digits:

Properties & Relations  (3)

Subdivide[xmin,xmax,n] is equivalent to Range[xmin,xmax,(xmax-xmin)/n]:

Subdivide[xmin,xmax,n] is equivalent to xmin+(xmax-xmin)Range[0,n]/n:

Array[f,n,{a,b}] is equivalent to Map[f,Subdivide[a,b,n-1]]:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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