cosm matrix cosine function

## Syntax

    t = cosm(x)

## Arguments

x

  a real or complex square matrix.

## Description

`cosm(x)` is the matrix cosine of the `x` matrix. `t=0.5*(expm(%i*x)+expm(-%i*x))`.

## Examples

    A=[1,2;3,4]
    cosm(A)-0.5*(expm(%i*A)+expm(-%i*A))

## See also

- cos
- expm