Script to test diagonal D matrix generation containing the derivatives of activation function at u