FUNCTION REFERENCE

funm

Evaluate a general matrix function.

Evaluate a general matrix function.

Syntax

F = funm(A, fun)

Syntax

F = funm(A, fun, options)

Syntax

[F, exitflag, output] = funm(...)

Uses the Schur-Parlett algorithm. fun is a handle such as @exp, @log, @sin, @cos, @sinh, @cosh, or a function fun(x, k) returning the k-th derivative. options may set TolBlk, TolTay, MaxTerms, MaxSqrt and Ord. MaxTerms must be an integer from 1 to 1000000; nonempty Ord must have one integer label in 1:n per eigenvalue. MaxSqrt is accepted for compatibility and has no effect, because every atomic block is evaluated with a Taylor series. output has fields terms, ind, ord and T.

Example

funm([1 0; 0 2], @exp)   % [2.7183 0; 0 7.3891]

Differences from MATLAB: Some results differ in the last printed digit.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.