Function File: y = thfm (x, mode)

Trigonometric/hyperbolic functions of square matrix x.

mode must be the name of a function. Valid functions are ’sin’, ’cos’, ’tan’, ’sec’, ’csc’, ’cot’ and all their inverses and/or hyperbolic variants, and ’sqrt’, ’log’ and ’exp’.

The code thfm (x, 'cos') calculates matrix cosinus even if input matrix x is not diagonalizable.

Important note: This algorithm does not use an eigensystem similarity transformation. It maps the mode functions to functions of expm, logm and sqrtm, which are known to be robust with respect to non-diagonalizable (’defective’) x.

See also: funm.

Package: linear-algebra