BoolToNumMatrix

Declaration: BoolToNumMatrix (Src: TBool2DArray; FalseValue, TrueValue: double; var Dst: TDouble2DArray): integer;
The function BoolToNumMatrix converts the boolean matrix Src into a dichotomous numeric matrix Dst. Each cell of the Dst array will either be filled by the value FalseValue or by TrueValue, depending on the state of the corresponding cell of the Src matrix.

The size of the matrix Dst will be automatically adjusted to fit the size of the matrix Src.

The function returns the following error codes:

 0 ... everything is OK, Dst contains the numeric values
-1 ... Src matrix has no length