DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


MinMaxOfNumCells

Declaration: TDataTable.MinMaxOfNumCells (LowCol, LowRow, HighCol, HighRow: integer; var Minimum, Maximum: double): integer;
The method MinMaxOfNumCells calculates the minimum and the maximum of all table elements within a specified range of cells which are neither marked as csNAN, nor as csUndefined and which belong to either interval or ratio scaled variables (that is "real" numbers). The range of cell elements to be used is determined by the parameters LowRow, LowCol, HighRow, and HighCol. If any of these parameters receives an invalid value, this value is automatically adjusted to the nearest boundary value (either 1 or NrOfColumns / NrOfRows).

The results are returned in the variable parameters Minimum and Maximum. The function value returns the number of data points used for the calculation (i.e. the number of numeric data cells within the specified range).

Hint: Setting both the low and high parameter of a dimension (i.e. LowCol and HighCol) to zero values forces the method to use all elements of that dimension.

Example: The statement Mat1.MinMaxOfNumCells (1,2,12,20,Mini,Maxi); calculates the minimum and the maximum of all matrix elements with the indices [1,2] to [12,20], and returns them in the variables Mini and Maxi.