How can we compute the gradient of a discrete function? Can we use Central difference formula to calculate the gradient of a discrete function?