function likelyv = likely(MIF,APS,min_MIF,nlines,delta_f,low_freq,high_freq)
%
%  Name:   likely
%
%  Usage:  likelyv = likely(MIF,APS,min_MIF,nlines,delta_f,low_freq,high_freq)
%
%  Determines likely modal frequencies based on MIF
%

%  Version EGS960904
%
%  Author(s): Erik G. Straser, estraser@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%               ESA-EA
%
%  Copyright (c) 1996, The Regents of the University
%       of California. (See top level of code for
%       full copyright statement.)

% Create table of likely natural frequencies
index = 0;
for i = 3 : (nlines - 3)
  if (MIF(i) > min_MIF)
    if   (((MIF(i))   > MIF(i-1)) &  (MIF(i-1) > MIF(i-2)))
      if (((MIF(i+1)) < MIF(i))   &  (MIF(i+2) < MIF(i+1)))
        this_freq = i * delta_f;
        if  (this_freq >= low_freq)
          if (this_freq <= high_freq)
            index = index + 1;
            likelyv(index,1) = i * delta_f;
            likelyv(index,2) = APS(i);
          end
        end
      end
    end
  end
end

return
