mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
632 B
632 B
Function row
Return row in Matrix.
Syntax
math.row(value, index) // retrieve a row
Parameters
| Parameter | Type | Description |
|---|---|---|
value |
Array | Matrix | An array or matrix |
row |
number | The index of the row |
Returns
| Type | Description |
|---|---|
| Array | Matrix | The retrieved row |
Examples
// get a row
const d = [[1, 2], [3, 4]]
math.row(d, 1)) // returns [3, 4]