coth method

Matrix coth()

Element-wise hyperbolic cotangent

Implementation

Matrix coth() {
  Matrix result = Matrix.zeros(rowCount, columnCount, isDouble: true);
  for (int i = 0; i < rowCount; i++) {
    for (int j = 0; j < columnCount; j++) {
      result[i][j] = 1 / math.tanh(this[i][j]);
    }
  }
  return result;
}