% perform one iteration of EM for the x4 example
% using uniform or Gaussian distribution of channel coefficients.

% set LLSQ coefficient matrix
%
  B = get_A( b, N, Memory);

% solve for the new channel coefficients
%
  FIR = B\(z');

% set new FSM state transition cost matrix
%
  trans = FSM_trans( states, FIR);

% set G
%
% for uniform h
%
  G = var_noise * inv(B'*B);
%
% for Gaussian h
%
%  G = inv( (B'*B)/var_noise + diag(ones(length(FIR),1)/var_h) );

% run the viterbi algorithm
%
  vit

% save data estimates in b
%
  b = get_ex;

% check accuracy
%
%  sum( b' ~= x)
