m = 10;
n = 40;
ca = zeros ( m, n );

for k = 0 : 40

  if ( k == 0 )
    ca(m,floor(n/2)) = 1;
  else
    ca(1:m-1,:) = ca(2:m,:);
    ca(m,:) = ca_step ( ca(m-1,:) );
  end
  
  clc
  fprintf ( '\n' );
  fprintf ( 'Step %d\n', k );
  for i = 1 : m
    fprintf ( '%d', ca(i,:) );
    fprintf ( '\n' );
  end

  pause
end
