UNPKG

821 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function expm
4
5Compute the matrix exponential, expm(A) = e^A. The matrix must be square.
6Not to be confused with exp(a), which performs element-wise
7exponentiation.
8
9The exponential is calculated using the Padé approximant with scaling and
10squaring; see "Nineteen Dubious Ways to Compute the Exponential of a
11Matrix," by Moler and Van Loan.
12
13
14## Syntax
15
16```js
17math.expm(x)
18```
19
20### Parameters
21
22Parameter | Type | Description
23--------- | ---- | -----------
24`x` | Matrix | A square Matrix
25
26### Returns
27
28Type | Description
29---- | -----------
30Matrix | The exponential of x
31
32
33## Examples
34
35```js
36const A = [[0,2],[0,0]]
37math.expm(A) // returns [[1,2],[0,1]]
38```
39
40
41## See also
42
43[exp](exp.md)