row
row(x, index)
Return a row from a matrix or array.
Try it yourself:
$1 | A = [[1, 2], [3, 4]] Your input: A = [[1, 2], [3, 4]] Processed to: A = [[1, 2], [3, 4]] Result: 1,2,3,4 lastResult: undefined Variables: { "A": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ] } | [[1, 2], [3, 4]] |
$2 | row(A, 1) Your input: row(A, 1) Processed to: row(A, 1) Result: undefined lastResult: 1,2,3,4 Variables: { "A": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ], "result": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ], "$1": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ] } | ✖ |
$3 | row(A, 2) Your input: row(A, 2) Processed to: row(A, 2) Result: undefined lastResult: 1,2,3,4 Variables: { "A": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ], "result": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ], "$1": [ [ { "mathjs": "BigNumber", "value": "1" }, { "mathjs": "BigNumber", "value": "2" } ], [ { "mathjs": "BigNumber", "value": "3" }, { "mathjs": "BigNumber", "value": "4" } ] ] } | ✖ |
See also:
All functions