1 % The likelihood of the observation for a single Markov Chain
\r
2 function likelihood = chain_likelihood(observation, mc)
\r
3 likelihood = mc.t(observation(1));
\r
4 for i=2:size(observation, 2)
\r
5 likelihood = likelihood * mc.T(observation(i-1), observation(i));
\r