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....

## MinMax

 Unit: SDL_matrix Class: Declaration: procedure MinMax (LowCol, LowRow, HighCol, HighRow: integer; var Minimum, Maximum: double); { class TMatrix } procedure MinMax (LowCol, LowRow, HighCol, HighRow: integer; var Minimum, Maximum: longint); { class TIntMatrix } procedure MinMax (LowCol, HighCol, LowRow, HighRow, LowLayer, HighLayer: integer; var Minimum, Maximum: double); { class TMat3D }

The method MinMax calculates the minimum and the maximum value of all matrix elements within a specific area. The range of the matrix elements to be used is determined by the parameters LowCol, LowRow, LowLayer, HighCol, HighRow, and HighLayer. If any of these parameters receives an invalid value, this value is automatically adjusted to the lowest or highest allowed value (1 for the "Low..." parameters, and NrOfColumns /NrOfRows for the "High...." parameters).

The variable parameters Minimum and Maximum return the lowest and the highest value of the selected data.

 Hint 1: If TIntMatrix is an empty sparse matrix, MinMax returns -MaxLongint in the variable parameter Maximum and +MaxLongint in the parameter Minimum .

 Hint 2: 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.MinMax (1,2,12,18,RMin,RMax); calculates the lowest and the highest value of all matrix elements with the indices [1,2] to [12,18], and returns them in the variables RMin and RMax.

 Example: This property is used in the following example program (see http://www.lohninger.com/examples.html for downloading the code): interpol3d

Last Update: 2017-Aug-16