function eer = eer_from_farfrr( far, frr )
  
  if nargin < 2
    error( [ mfilename ' needs two input arguments.' ] );
  end
  
  tmp = diff( [ far(:).'; frr(:).' ], [], 1 );
  ind = find( abs( diff( sign( tmp ) ) ) ~=0 );
  
  if isempty( ind )
    error( [ mfilename 'could not define EER!' ] );
  end
  
  if length( ind ) > 1
    if ~strcmp( warning, 'off' )
      disp( [ mfilename ': WARNING! Multiple definitions for EER!' ] );
    end
  end
  
  eer = mean(  [ mean( far( ind:ind+1 ) ) mean( frr( ind:ind+1 ) )  ]);
  