% This m-file computes the state probability vector
% for a Markov Process  with N states and  generator matrix Q 
% the vector sspi - contains the answer

bz = zeros(N-1,1);
B = [bz
     1];
QT = Q';
AU = QT(1:N-1, 1:N);
e = ones(1,N);
A = [AU
     e];
sspi = A\B
