trigmv, trighmv - The action of trigonometric and hyperbolic matrix functions


trigmv contains two MATLAB functions for computing cosm(tA)b and sinm(tA)b - trigmv - as well as coshm(tA)b and sinh(tA)b - trighmv, where A is an n-by-n matrix and b an n-by-1 vector.

The functionality of trigmvand trighmv is based on expmv by Al-Mohy and Higham.
Furthermore, the function expmv is extended - see expmv.m for more details.
That the original functionality and interface is preserved.

The basic functionality is as follows:

  • trigmv(t,A,b) computes [cosm(tA)b, sinm(tA)b]
  • trigmv(t,A,B) computes [cosm(tA)B, sinm(tA)B], for a skinny n-by-m matrix B
  • trighmv(t,A,b) computes [coshm(tA)b, sinhm(tA)b]
  • trighmv(t,A,B) computes [coshm(tA)B, sinhm(tA)B], for a tall, skinny n-by-m matrix B

The functions work for any matrix A and only use matrix-vector products with A and A^*.

Function test.m runs some simple test code.

Detail on the underlying algorithms can be found in the preprint:

N. J. Higham and P. Kandolf, "Computing the Action of Trigonometric and Hyperbolic Matrix Functions" MIMS Eprint 2016.40, University of Manchester

External contribution

Parts of this code are from expmv - Matrix exponential times a vector.

For more information on expmv by Al-Mohy and Higham visit the homepage or read the corresponding publication:

A. H. Al-Mohy and N. J. Higham, "Computing the action of the matrix exponential, with an application to exponential integrators" SIAM J. Sci. Comput., 33(2):488--511, 2011.