Function subMatrix

  • This function returns a new sub matrix with repect to the original row and column given. It is usefult for cofactors and matrix minors

    Throws

    TypeError - if any component of matrix dimension (row, column) is less than 3

    Example

    const matrix1 = new Matrix([1, 5, 0, -3, 2, 7, 0, 6, -3], 3, 3)
    subMatrix(matrix1, 0, 2) //-> Matrix([-3, 2,
    0, 6], 2, 2)

    Parameters

    • matrix: Matrix

      matrix to get submatrix from

    • row: number

      row to exclude from sub matrix

    • column: number

      column to exclude from sub matrix

    Returns Matrix

Generated using TypeDoc