Function pseudoInverse

  • Returns inverse of a matrix if it exists or the pseudoinverse.

    Parameters

    • matrix: MaybeMatrix
    • Optional threshold: number

      Threshold for taking inverse of singular values. Default: Number.EPSILON.

    Returns Matrix

    • The (pseudo)inverted matrix.