Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 400 and 401]

(no description)

File Size: 179 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MatrixFunctions:: (6 methods):
  getMatrix()
  sequence()
  determinant()
  inverse()
  multiply()
  identity()


Class: MatrixFunctions  - X-Ref

getMatrix($matrixValues)   X-Ref
Convert parameter to Matrix.

param: mixed $matrixValues A matrix of values

sequence($rows = 1, $columns = 1, $start = 1, $step = 1)   X-Ref
SEQUENCE.

Generates a list of sequential numbers in an array.

Excel Function:
SEQUENCE(rows,[columns],[start],[step])

param: mixed $rows the number of rows to return, defaults to 1
param: mixed $columns the number of columns to return, defaults to 1
param: mixed $start the first number in the sequence, defaults to 1
param: mixed $step the amount to increment each subsequent value in the array, defaults to 1
return: array|string The resulting array, or a string containing an error

determinant($matrixValues)   X-Ref
MDETERM.

Returns the matrix determinant of an array.

Excel Function:
MDETERM(array)

param: mixed $matrixValues A matrix of values
return: float|string The result, or a string containing an error

inverse($matrixValues)   X-Ref
MINVERSE.

Returns the inverse matrix for the matrix stored in an array.

Excel Function:
MINVERSE(array)

param: mixed $matrixValues A matrix of values
return: array|string The result, or a string containing an error

multiply($matrixData1, $matrixData2)   X-Ref
MMULT.

param: mixed $matrixData1 A matrix of values
param: mixed $matrixData2 A matrix of values
return: array|string The result, or a string containing an error

identity($dimension)   X-Ref
MUnit.

param: mixed $dimension Number of rows and columns
return: array|string The result, or a string containing an error