function pot2 = cg_to_table(pot)
% CG_TO_TABLE Convert a Conditional Gaussian potential to a discrete potential.
% pot2 = cg_to_table(pot)

pot = cg_can_to_mom(pot);
pot2 = mk_table(pot.ddom, pot.dsizes);
for i=1:pot.dsize
  pot2.T(i) = exp(pot.pot{i}.logp);
end
