Y = funm(X,'function')
funm evaluates general matrix functions. For any square matrix argument X, funm(X,'function') evaluates the matrix function specified by function using Parlett's method [1].
funm(X,'sqrt') and funm(X,'log') are equivalent to sqrtm(X) and logm(X). funm(X,'exp') and expm(X) compute the same function, but by different algorithms. expm(X) is preferred.
produce the same results to within roundoff error asS = funm(X,'sin');C = funm(X,'cos');
In either case, the results satisfyE = expm(i*X);C = real(E);S = imag(E);
S*S+C*C = I
where I = eye(size(X))
expm,logm,sqrtm
[2] C. B. Moler and C. F. Van Loan, "Nineteen Dubious Ways to Compute the Exponential of a Matrix," SIAM Review 20, pp. 801-836, 1979.
(c) Copyright 1994 by The MathWorks, Inc.