The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TDataTable
Declaration: function MinMaxOfMarkedCells (LowCol, LowRow, HighCol, HighRow: integer; CellState: byte; var Minimum, Maximum: double): integer;

The method MinMaxOfMarkedCells returns the minimum and the maximum value of all matrix elements within a specified range of cells which are neither marked as csNAN, nor as csUndefined and which match the CellState parameter at least in one bit. The parameter CellState is a bit mask reflecting the cell state(s) to be searched for. Allowed cell states are csUser1, csUser2, csUser3, csImputed, csMarkedA, and csMarkedB.

The range of the matrix 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 variable parameters Minimum and Maximum return the lowest and the highest value of the selected data. For categorial variables the ordinal values of the cells are used. The function returns the number of data points used for the calculation (i.e. the number of valid 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.

Last Update: 2012-Oct-20