function cc = pmatrix(n)
% pmatrix(n) -- generate an n-by-n probability transition matrix
%               consisting of random entries.

cc = rand(n);

for i = 1:n
  cc(i,:) = cc(i,:)/sum(cc(i,:));
end
