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