|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....|
|Home MathPack Math2 Procedures and Functions CalcDiffMat|
|See also: CalcCovar|
The routine CalcDiffMat calculates the difference matrix from a given data matrix. The resulting matrix is of the dimension (HiC -LoC +1)*(HiC -LoC +1), this means that the rows of the data matrix are seen as objects and the columns are seen as variables.
The parameter InData holds a pointer to the matrix of the input data. This matrix is an object of the class TMatrix. The parameter DiffMat holds a pointer to a matrix which will contain the difference matrix to be calculated.
The parameters LoC, HiC, LoR, and HiR specify the range of the data matrix, which should be used for the calculation. This enables to calculate 'local' difference matrices which originates from only a part of the data. Normally the calculation will be performed for the whole data matrix InData, LoC =1, HiC =InData.NrOfColumns, LoR =1, and HiR =InData.NrOfRows
The parameter Scaling determines how to scale the data before calculating the result matrix. This will lead to three different matrices, depending on the parameter Scaling :
Standardization of the data (sometimes called 'autoscaling') is performed by scaling the data in a way that the mean of each column becomes zero and the variance becomes 1.0.
The function CalcDiffMat returns the value TRUE if the calculation of the difference matrix has been performed successfully. A returned value of FALSE indicates that the calculation could not finished properly (mostly due to lack of memory or too small a matrix DiffMat