Ratios
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 all close allBasic Examples (2)
Scope (3)
Ratios of rows, within each column:
Ratios[(| | | |
| :-- | :-- | :-- |
| a11 | a12 | a13 |
| a21 | a22 | a23 |
| a31 | a32 | a33 |)]//MatrixFormRatios[(| | | |
| :-- | :-- | :-- |
| a11 | a12 | a13 |
| a21 | a22 | a23 |
| a31 | a32 | a33 |), {1, 0}]//MatrixFormRatios of columns, within each row:
Ratios[(| | | |
| :-- | :-- | :-- |
| a11 | a12 | a13 |
| a21 | a22 | a23 |
| a31 | a32 | a33 |), {0, 1}]//MatrixFormRatios of a TimeSeries:
ts = TemporalData[TimeSeries, {{{x[1], x[2], x[3], x[4], x[5], x[6]}}, {{0, 5, 1}}, 1,
{"Continuous", 1}, {"Discrete", 1}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False, 10.1];ts["Path"]ratios = Ratios[ts]ratios["Path"]Properties & Relations (2)
History
Text
Wolfram Research (2008), Ratios, Wolfram Language function, https://reference.wolfram.com/language/ref/Ratios.html.
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
BibTeX
@misc{reference.wolfram_2026_ratios, author="Wolfram Research", title="{Ratios}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Ratios.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_ratios, organization={Wolfram Research}, title={Ratios}, year={2008}, url={https://reference.wolfram.com/language/ref/Ratios.html}, note=[Accessed: 13-June-2026]}