Extension of MatrixExp
- To: mathgroup@smc.vnet.net
- Subject: [mg11669] Extension of MatrixExp
- From: lang@einev.ch (Fred Lang)
- Date: Sat, 21 Mar 1998 18:35:07 -0500
Dear MathGroup users, MatrixExp is not able to give me a nice answer in the following very easy case: In[1] = m = {{2,0,0},{0,3,0},{0,0,4}} ; (* A diagonal matrix *) In[2] = MatrixExp[t*m] I define my own function In[3] = matrixExp[m_ , t_] := Module[ {e,d,i,j} , e = m // N // Eigenvectors // Transpose ; i = e // Inverse ; d = i.m.e ; d = d*t ; Do[ d[[j,j]] = Exp[d[[j,j]]] , {j, Length[d]}] e.d.i ] In[4] = matrixExp[m , t] The result is ok, but perhaps somebody have a best (more compact) solution... Thank you for your answers. Fred lang