simple-squiggle

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

matrixFromColumns.md (994B)


      1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
      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 &#124; Matrix | Multiple columns
     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.matrixFromColumns([1, 2, 3], [[4],[5],[6]])
     40 math.matrixFromColumns(...vectors)
     41 ```
     42 
     43 
     44 ## See also
     45 
     46 [matrix](matrix.md),
     47 [matrixFromRows](matrixFromRows.md),
     48 [matrixFromFunction](matrixFromFunction.md),
     49 [zeros](zeros.md)