New to Kendo UI for AngularStart a free 30-day trial

Matrix

Class

The "matrix" type which can be used in the custom JavaScript functions (primitives) in formulas.

Definition

Package:@progress/kendo-angular-spreadsheet

Methods

Returns a new matrix with the same data.

Returns:

Matrix

Returns the determinant of this matrix. The matrix should contain only numbers and be square. Note that there are no checks for this.

Returns:

number

Iterates through elements of the matrix and calling the func for each element (first columns, then rows).

Parameters:func(value: any, row: number, column: number) => void

The function which will be called for each element.

includeEmptyboolean

If true, it will call the function for empty (null) elements as well. Otherwise, it only calls it where a value exists.

Returns the element at a given location.

Parameters:rownumbercolnumberReturns:

any

Returns the inverse of this matrix. The matrix should contain only numbers and be square. Note that there are no checks for this. If the inverse does not exist, the determinant is zero, then it returns null.

Returns:

Matrix

Similar to each, but produces a new matrix of the same shape as the original one with the values returned by the function.

Parameters:func(value: any, row: number, column: number) => void

The function which will be called for each element.

includeEmptyboolean

If true, it will call the function for empty (null) elements as well. Otherwise, it only calls it where a value exists.

Returns:

Matrix

Multiplies the current matrix by the given matrix, and returns a new matrix as the result.

Parameters:mMatrixReturns:

Matrix

Sets the element at a given location.

Parameters:rownumbercolnumbervalueany

Returns the transposed matrix. The rows of the original matrix become columns of the transposed one.

Returns:

Matrix

Returns the unit square matrix of size n.

Parameters:nnumberReturns:

Matrix

Properties

height

number

Indicate the height of the matrix.

width

number

Indicate the width of the matrix.