lambdaA=0.05
muA=0.02
lambdaB=0.1
muB=0.05

size=5

  Q=zeros(size,size)
  e=zeros(size,1)

  Q(1,2) = lambdaA
  Q(1,3) = lambdaB
  Q(2,1) = muA
  Q(2,4) = lambdaB
  Q(3,1) = muB
  Q(3,5) = lambdaA
  Q(4,3) = muA
  Q(5,2) = muB

  for i=1:size
      s=0
      for j=1:size
          s = s+Q(i,j)
      end
      Q(i,i) = -s
  end

  Qt = Q'
 
  for i=1:size
      Qt(size,i) = 1
  end

  e(size) = 1

  p = linsolve(Qt,e)
