% ------------------------------
% forward propagation 

function [a] = alpha(x,hmm)

n = length(x);
a = zeros(length(hmm.p0),n);

a(:,1) = hmm.p0' .* hmm.Po(:,x(1));
for t=2:n,
  a(:,t) = (a(:,t-1)'*hmm.Pt)'.*hmm.Po(:,x(t));
end;

