mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
28 lines
984 B
Markdown
28 lines
984 B
Markdown
# Function subset
|
|
|
|
Get or set a subset of a matrix or string
|
|
|
|
Usage: // retrieve subset: var subset = math.subset(value, index)
|
|
|
|
// replace subset: var value = math.subset(value, index, replacement [, defaultValue])
|
|
|
|
Where: {Array | Matrix | String} value An array, matrix, or string {Index} index An index containing ranges for each dimension {*} replacement An array, matrix, or scalar {*} [defaultValue] Default value, filled in on new entries when the matrix is resized. If not provided, new matrix elements will be left undefined.
|
|
|
|
|
|
### Parameters
|
|
|
|
Parameter | Type | Description
|
|
--------- | ---- | -----------
|
|
|
|
|
|
### Returns
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
| undefined
|
|
|
|
|
|
|
|
|
|
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|