trials = 1000;

residual = zeros( trials, 1);
nwrong = zeros( trials, 1);

for i=1:trials

  x4;

  x4_em_init;

  x4_em_iter;
  x4_em_iter;
  x4_em_iter;

  B = get_A( b, N, Memory);

  residual(i) = norm( z' - B*FIR);
  nwrong(i) = sum( b' ~= x);
end
