1 |
|
2 |
|
3 | # Function matrixFromColumns
|
4 |
|
5 | Create a dense matrix from vectors as individual columns.
|
6 | If you pass row vectors, they will be transposed (but not conjugated!)
|
7 |
|
8 |
|
9 | ## Syntax
|
10 |
|
11 | ```js
|
12 | math.matrixFromColumns(...arr)
|
13 | math.matrixFromColumns(col1, col2)
|
14 | math.matrixFromColumns(col1, col2, col3)
|
15 | ```
|
16 |
|
17 | ### Parameters
|
18 |
|
19 | Parameter | Type | Description
|
20 | --------- | ---- | -----------
|
21 | `cols` | ... Array | Matrix | Multiple columns
|
22 |
|
23 | ### Returns
|
24 |
|
25 | Type | Description
|
26 | ---- | -----------
|
27 | number[][] | Matrix | if at least one of the arguments is an array, an array will be returned
|
28 |
|
29 |
|
30 | ## Examples
|
31 |
|
32 | ```js
|
33 | math.matrixFromColumns([1, 2, 3], [[4],[5],[6]])
|
34 | math.matrixFromColumns(...vectors)
|
35 | ```
|
36 |
|
37 |
|
38 | ## See also
|
39 |
|
40 | [matrix](matrix.md),
|
41 | [matrixFromRows](matrixFromRows.md),
|
42 | [matrixFromFunction](matrixFromFunction.md),
|
43 | [zeros](zeros.md)
|