DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


ReciprocalMatrix

Declaration: ReciprocalMatrix (var Mat: TDouble2DArray; IndefVal: double): integer;
The function ReciprocalMatrix calculates the reciprocal value of each element of the two-dimensional array Mat. The parameter IndefVal controls which value is used instead of the reciprocal if the original value is zero.

The function returns the following error codes:

 0 ... everything is OK
-1 ... Mat has zero size