This is the code to benchmark your computer

**Mathematica**

-----------------------------------------------------------------

M = Table[Random[], {i, 1, 300}, {j, 1, 300}];

t = 0.25; T = 2;

Timing[Inverse[M].(MatrixExp[-M t] - MatrixExp[-M T]);]

{0.188, Null}

--------------------------------------------------------------------

In Matlab, here is the same code:

Matlab

------------------------------------------------------------

M = rand(300,300);

t=0.25; T=2;

tic; inv(M) * (expm(-t*M) - expm(-T*M)); toc;

--------------------------------------------------------------

If you have a fast computer, you should beat 0.188 second it took for the Mathematica. Matlab is usually faster.

My T60 laptop took 0.6 second to run in Matlab 7.6