adding
[mlfp.git] / matlab / chain_likelihood.m
blobe34b7fd301f035bca94c079f69b63ead3a885bba
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
6 end