function suspect = counterfeit_detection_brute ( n, coin, correct )

%*****************************************************************************80
%
%% counterfeit_detection_brute detects counterfeit coins.
%
%  Discussion:
%
%    We are given the weights of N coins, and the correct weight of a single 
%    coin.  We are asked to identify the counterfeit coins, that is, those
%    with incorrect weight.  We don't know how many such coins there are.
%
%    We simply use brute force.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    19 March 2019
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Kurt Bryan, Tanya Leise,
%    Making do with less: an introduction to compressed sensing,
%    SIAM Review,
%    Volume 55, Number 3, September 2013, pages 547-566.
%
%  Parameters:
%
%    Input, integer n, the number of coins.
%
%    Input, real coin(n), the weights of the coins.
%
%    Input, real correct, the correct weight of a single coin.
%
%    Output, integer suspect(*), the indices of the suspected counterfeit coins.
%
  coin = coin(:);

  suspect = find ( coin ~= correct );

  return
end

