Documentation Center    • Trial Software   • Product Updates
Evaluate general matrix function   F = funm(A,fun) F =
funm(A,fun,options) F = funm(A,fun,options,p1,p2,...)
[F,exitflag] = funm(...) [F,exitflag,output] = funm(...)   F =
funm(A,fun) evaluates the user-defined function fun at the
square matrix argument A. F = fun(x,k) must accept a vector x
and an integer k, and return a vector f of the same size of x,
where f(i) is the kth derivative of the function fun evaluated
at x(i). The function represented by fun must have a Taylor
series with an infinite radius of convergence, except for fun =
@log, which is treated as a special case.  You can also use funm
to evaluate the special functions listed in the following table
at the matrix A.   Syntax for Evaluating Function at Matrix A
funm(A, @exp)   funm(A, @log)   funm(A, @sin)   funm(A, @cos)
funm(A, @sinh)   funm(A, @cosh)  For matrix square roots, use
sqrtm(A) instead. For matrix exponentials, which of expm(A) or
funm(A, @exp) is the more accurate d