Calculate the error function of each element of a Matrix.
This function calculates the error function of each element in a Matrix