function v = coin_uniform ( n )

%*****************************************************************************80
%
%% coin_uniform() generates N uniformly random coin flips.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 September 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of tosses.
%
%  Output:
%
%    integer V(N), a vector of -1's for tails, and 1's for heads.
%
% rng ( 'shuffle' );

  v = ( rand ( n, 1 ) < 0.5 );

  v = 2.0 * v - 1.0;

  return
end
