UNPKG

942 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function matrixFromColumns
4
5Create a dense matrix from vectors as individual columns.
6If you pass row vectors, they will be transposed (but not conjugated!)
7
8
9## Syntax
10
11```js
12math.matrixFromColumns(...arr)
13math.matrixFromColumns(col1, col2)
14math.matrixFromColumns(col1, col2, col3)
15```
16
17### Parameters
18
19Parameter | Type | Description
20--------- | ---- | -----------
21`cols` | ... Array &#124; Matrix | Multiple columns
22
23### Returns
24
25Type | Description
26---- | -----------
27number[][] &#124; Matrix | if at least one of the arguments is an array, an array will be returned
28
29
30## Examples
31
32```js
33math.matrixFromColumns([1, 2, 3], [[4],[5],[6]])
34math.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)