with(linalg);                              # load linear algebra package

idx := INDEX;

Q := array(sparse,1..idx,1..idx);

b := array(sparse,1..idx);


m4_changequote([[,]])
m4_sinclude(experiments/m4_sinclude(basename).exp)


read `FILENAME.maple`;

Qt := transpose(Q):

for i to idx do Qt[idx,i] := 1.0 od:       # replace the last equation by
                                           # the normalisation constant in
b[idx] := 1.0;                             # both Qt and b

p := linsolve(Qt,b);                       # solve to find the unknowns, the
                                           # steady state distribution



