Matrix cosine.

F = cosm(A)

F = cosm(x) returns the Taylor series expansion for function of matrices.

A = matrix (double matrix).

F = matrix x.n by x.n translating cos(A) in terms of its Taylor series expansion.