MatrixExp
- To: mathgroup at smc.vnet.net
- Subject: [mg42841] MatrixExp
- From: Janak Wedagedera <janak at maths.warwick.ac.uk>
- Date: Wed, 30 Jul 2003 19:30:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
Suppose x is a real square matrix of some order n,
y is a vector of integers, t a real number and
I want to compute y. exp(x t) - the usual thing
arise in when computing transient probabilities in
stochastic processes for instance.
Things work fine as long as n <100 to 300
but when x is a large (n >= 1000) and is sparse (and
band), its going to take ages with the
following expression which I am using for
the job:
pt = Compile[{t, {x, _Real, 2}, {y, _Integer, 1}}, Last[y.MatrixExp[x t]]]
and say we want to compute pt at t=1,
x = G and y = p0, then
pt[1,G,p0] would do it (G and p0 are numerically
known entities).
I shall be so thankful if some one could kindly
tell me if there is a special way to handle
a sparse matrix x to compute exp(x t) with
version 4.2.
THanks very much
Janak.