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 DataTable Methods CalcCovar  
CalcCovar 

The function 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 (HiCLoC+1)*(HiCLoC+1), this means that the rows of the data matrix are seen as objects and the columns are seen as variables. The parameter CovarMat holds a pointer to a matrix which will contain the matrix to be calculated. Please note that the method CalcCovar calculates the requested values only for data cells which are neither marked as csNAN, nor as csUndefined. 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.
