mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif
48 lines (30 loc) • 921 B
Markdown
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
Calculates the kronecker product of 2 matrices or vectors.
NOTE: If a one dimensional vector / matrix is given, it will be
wrapped so its two dimensions.
See the examples.
```js
math.kron(x, y)
```
Parameter | Type | Description
--------- | ---- | -----------
`x` | Array &
`y` | Array &
Type | Description
---- | -----------
Array &
```js
math.kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])
// returns [ [ 1, 2, 0, 0 ], [ 3, 4, 0, 0 ], [ 0, 0, 1, 2 ], [ 0, 0, 3, 4 ] ]
math.kron([1,1], [2,3,4])
// returns [ [ 2, 3, 4, 2, 3, 4 ] ]
```
[ ](multiply.md),
[ ](dot.md),
[ ](cross.md)