UNPKG

927 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function matrixFromRows
4
5Create a dense matrix from vectors as individual rows.
6If you pass column vectors, they will be transposed (but not conjugated!)
7
8
9## Syntax
10
11```js
12math.matrixFromRows(...arr)
13math.matrixFromRows(row1, row2)
14math.matrixFromRows(row1, row2, row3)
15```
16
17### Parameters
18
19Parameter | Type | Description
20--------- | ---- | -----------
21`rows` | ... Array &#124; Matrix | Multiple rows
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.matrixFromRows([1, 2, 3], [[4],[5],[6]])
34math.matrixFromRows(...vectors)
35```
36
37
38## See also
39
40[matrix](matrix.md),
41[matrixFromColumns](matrixFromColumns.md),
42[matrixFromFunction](matrixFromFunction.md),
43[zeros](zeros.md)