rStats.js v1.3.0
    Preparing search index...

    Function expm

    • Matrix exponential. Equivalent to expm::expm(x, method, order) in R. The methods are "Higham08.b" (the default), "Higham08", "Pade", "Taylor", "PadeO" and "TaylorO".

      "Higham08.b" and "Higham08" use the scaling and squaring method with Padé approximants of degree 3, 5, 7, 9 or 13 (Higham 2005), with or without balancing first, and throw if a linear system of the method is computationally singular. The other methods use scaling and squaring with a Taylor polynomial or a diagonal Padé approximant of degree order (the Padé quotient by the conjugate gradient squared method, as expm does).

      Parameters

      Returns number[][]

      exp(x) as an array of rows.

      expm([[0, 1], [0, 0]]); // [[1, 1], [0, 1]]
      expm([[0, -1], [1, 0]]); // [[0.5403023059, -0.8414709848], [0.8414709848, 0.5403023059]] (cos 1 and sin 1)