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 CalcCovar | |||||||||||||||||||||||||||||||||
See also: CorrCoeff, AbortMathProc, Square, ClassScatterMatrices | |||||||||||||||||||||||||||||||||
CalcCovar |
|||||||||||||||||||||||||||||||||
The routine CalcCovar calculates the covariance matrix, or alternatively, the scatter matrix, the correlation matrix, the squared correlation matrix, or the sum of squared differences for 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 contains the input data. The parameter CovarMat holds a pointer to a matrix which will contain the 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 the user to calculate 'local' covariance matrices which originate only from a part of the data. The parameter Mode determines which matrix to calculate:
The function CalcCovar returns the value TRUE if the calculation of the matrix has been performed successfully. A FALSE value indicates that the calculation has not been completed successfully (mostly due to lack of memory or too small a matrix of CovarMat ). CalcCovar increments the global variable ProcStat and calls the feedback routine MathFeedBackProc in order to allow feedback to the user during time consuming calculations. The CalcCovar function can be terminated by setting the global variable AbortMathProc to TRUE.
|