Skip to content

Latest commit

 

History

History
101 lines (50 loc) · 1.31 KB

File metadata and controls

101 lines (50 loc) · 1.31 KB

Home > @josh-brown/vector > MatrixBuilder > exclude

MatrixBuilder.exclude() method

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;

Parameters

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

Example

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 ]