1 |
|
2 |
|
3 | # Function column
|
4 |
|
5 | Return a column from a Matrix.
|
6 |
|
7 |
|
8 | ## Syntax
|
9 |
|
10 | ```js
|
11 | math.column(value, index)
|
12 | ```
|
13 |
|
14 | ### Parameters
|
15 |
|
16 | Parameter | Type | Description
|
17 | --------- | ---- | -----------
|
18 | `value` | Array | Matrix | An array or matrix
|
19 | `column` | number | The index of the column
|
20 |
|
21 | ### Returns
|
22 |
|
23 | Type | Description
|
24 | ---- | -----------
|
25 | Array | Matrix | The retrieved column
|
26 |
|
27 |
|
28 | ## Examples
|
29 |
|
30 | ```js
|
31 | // get a column
|
32 | const d = [[1, 2], [3, 4]]
|
33 | math.column(d, 1) // returns [[2], [4]]
|
34 | ```
|
35 |
|
36 |
|
37 | ## See also
|
38 |
|
39 | [row](row.md)
|