test matrixCalcDiff()