MatrixFunctions
Table of Contents
- determinant() : float|string
- MDETERM.
- identity() : array<string|int, mixed>|string
- MUnit.
- inverse() : array<string|int, mixed>|string
- MINVERSE.
- multiply() : array<string|int, mixed>|string
- MMULT.
- sequence() : array<string|int, mixed>|string
- SEQUENCE.
- getMatrix() : Matrix
- Convert parameter to Matrix.
Methods
determinant()
MDETERM.
public
static determinant(mixed $matrixValues) : float|string
Returns the matrix determinant of an array.
Excel Function: MDETERM(array)
Parameters
- $matrixValues : mixed
-
A matrix of values
Return values
float|string —The result, or a string containing an error
identity()
MUnit.
public
static identity(mixed $dimension) : array<string|int, mixed>|string
Parameters
- $dimension : mixed
-
Number of rows and columns
Return values
array<string|int, mixed>|string —The result, or a string containing an error
inverse()
MINVERSE.
public
static inverse(mixed $matrixValues) : array<string|int, mixed>|string
Returns the inverse matrix for the matrix stored in an array.
Excel Function: MINVERSE(array)
Parameters
- $matrixValues : mixed
-
A matrix of values
Return values
array<string|int, mixed>|string —The result, or a string containing an error
multiply()
MMULT.
public
static multiply(mixed $matrixData1, mixed $matrixData2) : array<string|int, mixed>|string
Parameters
- $matrixData1 : mixed
-
A matrix of values
- $matrixData2 : mixed
-
A matrix of values
Return values
array<string|int, mixed>|string —The result, or a string containing an error
sequence()
SEQUENCE.
public
static sequence([mixed $rows = 1 ][, mixed $columns = 1 ][, mixed $start = 1 ][, mixed $step = 1 ]) : array<string|int, mixed>|string
Generates a list of sequential numbers in an array.
Excel Function: SEQUENCE(rows,[columns],[start],[step])
Parameters
- $rows : mixed = 1
-
the number of rows to return, defaults to 1
- $columns : mixed = 1
-
the number of columns to return, defaults to 1
- $start : mixed = 1
-
the first number in the sequence, defaults to 1
- $step : mixed = 1
-
the amount to increment each subsequent value in the array, defaults to 1
Return values
array<string|int, mixed>|string —The resulting array, or a string containing an error
getMatrix()
Convert parameter to Matrix.
private
static getMatrix(mixed $matrixValues) : Matrix
Parameters
- $matrixValues : mixed
-
A matrix of values