Ratios

Ratios[list]

gives the successive ratios of elements in list.

Ratios[list,n]

gives the n^(th) iterated ratios of list.

Ratios[list,{n1,n2,}]

gives the successive nk^(th) ratios at level k in a nested list.

Details

  • Ratios divides successive elements by preceding ones, so that Ratios[{x1,x2}] gives {x2/x1}.
  • If list has length s, Ratios[list,n] has length s-n.
  • Ratios[m,{1,0}] or Ratios[m,1] finds the successive ratios of rows in a 2D array or matrix m. Ratios[m,{0,1}] finds the ratios of columns.
  • Ratios[list,{n1,n2}] is equivalent to Ratios[Ratios[list,n1],{0,n2}].

Examples

open allclose all

Basic Examples  (2)

First ratios:

Second ratios:

Scope  (3)

Ratios of rows, within each column:

Ratios of columns, within each row:

Ratios of a TimeSeries:

Properties & Relations  (2)

First ratios are constant for a geometric sequence:

FoldList with Times acts as an inverse of Ratios:

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

Text

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

BibTeX

@misc{reference.wolfram_2020_ratios, author="Wolfram Research", title="{Ratios}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Ratios.html}", note=[Accessed: 16-January-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_ratios, organization={Wolfram Research}, title={Ratios}, year={2008}, url={https://reference.wolfram.com/language/ref/Ratios.html}, note=[Accessed: 16-January-2021 ]}

CMS

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

APA

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