function ubvec = ubvec_random ( n )

%*****************************************************************************80
%
%% ubvec_random() returns a pseudorandom BVEC.
%
%  Discussion:
%
%    A UBVEC is a vector of N binary digits.
%
%    A UBVEC can be interpreted as a binary representation of an
%    unsigned integer, with the first entry being the coefficient of
%    2^(N-1) and the last entry the coefficient of 1.
%
%    UBVEC   #
%    -----  --
%    00000   0
%    00001   1
%    00010   2
%    10000  16
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    19 November 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of the vector.
%
%  Output:
%
%    integer UBVEC(N), a pseudorandom binary vector.
%
  ubvec = randi ( [ 0, 1 ], n, 1 );

  return
end
