function ll = markovLL(stream,c2)
  c1 = sum(c2,2);
  p0 = c1/sum(c1);
  p1 = op(c2,'./',c1);
  lp0 = log(p0);
  lp1 = log(p1);
  ll = lp0(stream(1));
  for i=2:length(stream)
    ll = ll+lp1(stream(i-1),stream(i));
  end
  