simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

matrixFromRows.md (979B)


      1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
      2 
      3 # Function matrixFromRows
      4 
      5 Create a dense matrix from vectors as individual rows.
      6 If you pass column vectors, they will be transposed (but not conjugated!)
      7 
      8 
      9 ## Syntax
     10 
     11 ```js
     12 math.matrixFromRows(...arr)
     13 math.matrixFromRows(row1, row2)
     14 math.matrixFromRows(row1, row2, row3)
     15 ```
     16 
     17 ### Parameters
     18 
     19 Parameter | Type | Description
     20 --------- | ---- | -----------
     21 `rows` | ... Array &#124; Matrix | Multiple rows
     22 
     23 ### Returns
     24 
     25 Type | Description
     26 ---- | -----------
     27 number[][] &#124; Matrix | if at least one of the arguments is an array, an array will be returned
     28 
     29 
     30 ### Throws
     31 
     32 Type | Description
     33 ---- | -----------
     34 
     35 
     36 ## Examples
     37 
     38 ```js
     39 math.matrixFromRows([1, 2, 3], [[4],[5],[6]])
     40 math.matrixFromRows(...vectors)
     41 ```
     42 
     43 
     44 ## See also
     45 
     46 [matrix](matrix.md),
     47 [matrixFromColumns](matrixFromColumns.md),
     48 [matrixFromFunction](matrixFromFunction.md),
     49 [zeros](zeros.md)