50 lines
979 B
Markdown
50 lines
979 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
|
|
|
# Function matrixFromRows
|
|
|
|
Create a dense matrix from vectors as individual rows.
|
|
If you pass column vectors, they will be transposed (but not conjugated!)
|
|
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
math.matrixFromRows(...arr)
|
|
math.matrixFromRows(row1, row2)
|
|
math.matrixFromRows(row1, row2, row3)
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Parameter | Type | Description
|
|
--------- | ---- | -----------
|
|
`rows` | ... Array | Matrix | Multiple rows
|
|
|
|
### Returns
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
number[][] | Matrix | if at least one of the arguments is an array, an array will be returned
|
|
|
|
|
|
### Throws
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
|
|
|
|
## Examples
|
|
|
|
```js
|
|
math.matrixFromRows([1, 2, 3], [[4],[5],[6]])
|
|
math.matrixFromRows(...vectors)
|
|
```
|
|
|
|
|
|
## See also
|
|
|
|
[matrix](matrix.md),
|
|
[matrixFromColumns](matrixFromColumns.md),
|
|
[matrixFromFunction](matrixFromFunction.md),
|
|
[zeros](zeros.md)
|