Home > @josh-brown/vector > MatrixBuilder > exclude
Constructs a new matrix with all entries in row rowToExclude and in column columnToExclude removed.
Signature:
exclude(matrix: Matrix<S>, rowToExclude: number, columnToExclude: number): M;|
Parameter |
Type |
Description |
|---|---|---|
|
matrix |
Matrix<S> |
The input matrix |
|
rowToExclude |
number |
The index of the row that will be removed |
|
columnToExclude |
number |
The index of the column that will be removed |
Returns:
M
The new matrix
const I = matrixBuilder.identity(4);
const excluded = matrixBuilder.slice(I, 1, 2)
// [ 1 0 0* 0 ]
// [ 0* 1* 0* 0* ] => [ 1 0 0 ]
// [ 0 0 1* 0 ] [ 0 0 0 ]
// [ 0 0 0* 1 ] [ 0 0 1 ]