Home Manual Packages Global Index Keywords Quick Reference Language Reference Function Reference Including Source Files Comments Issuing Shell Commands Matrix Multiplication Information About Variables Elementary Functions Advanced Array Indexing Index Range Functions Logical Functions Interpolation and Lookup Functions Sorting Transposing Manipulating Strings Generating Simple Meshes Using Pointers Instancing Data Structures Reshaping Arrays I/O Reference | # Yorick Function Reference ## Index Range Functions Range functions are executed from left to right if more than one appears in a single index list. The following range functions reduce the rank of the result, like a scalar index: `min` minimum of values along index `max` maximum of values along index `sum` sum of values along index `avg` average of values along index `rms` root mean square of values along index `ptp` peak-to-peak of values along index `mnx` index at which minimum occurs `mxx` index at which maximum occurs The following functions do not change the rank of the result, like an index range. However, the length of the index is changed as indicated by +1, -1, or 0 (no change): `cum, psum` +1, 0, partial sums of values along index `dif` -1, pairwise differences of adjacent values `zcen` -1, pairwise averages of adjacent values `pcen` +1, pairwise averages of adjacent interior values `uncp` -1, inverse of pcen (point center) operation For example, given a two-dimensional array `x`, `x(min,max)` returns the largest of the smallest elements along the first dimension. To get the smallest of the largest elements along the second dimension, use `x(,max)(min)`.