comparison mftoolbox/funm_ev.m @ 0:8f23314345f4 draft

Create local repository for matrix toolboxes. Step #0 done.
author Antonio Pino Robles <data.script93@gmail.com>
date Wed, 06 May 2015 14:56:53 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:8f23314345f4
1 function F = funm_ev(A,fun)
2 %FUNM_EV Evaluate general matrix function via eigensystem.
3 % F = FUNM_EV(A,FUN) evaluates the function FUN at the
4 % square matrix A using the eigensystem of A.
5 % This function is intended for diagonalizable matrices only
6 % and can be numerically unstable.
7
8 [V,D] = eig(A);
9 F = V * diag(feval(fun,diag(D))) / V;