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: none
Declaration: DiscretizeArray (var Mat: TDouble2DArray; NLevels: integer; InLow, InHigh, OutLow, OutHigh: double): integer;

The function DiscretizeArray applies a staircase function to the data matrix Mat, transforming the continuous values in the matrix to discrete values. The parameter NLevels defines the number of steps the output value should have. The parameters InLow, InHigh, OutLow and OutHigh control the transfer function according to the figure below:

The function returns the following error codes:

 0 ... everything is OK
-1 ... the number of levels if less than 3
-2 ... the parameter InLow is greater than InHigh

Last Update: 2017-Okt-29