% ------------------------------
% backward propagation

function [b] = beta(x,hmm)

n = length(x);
b = ones(length(hmm.p0),n);

for t=n-1:-1:1,
  b(:,t) = hmm.Pt*(b(:,t+1).*hmm.Po(:,x(t+1)));
end;



