function [indx]=find_indx(inTheseValues,findTheseValues)

% [indx] = find_indx(inTheseValues,findTheseValues)
% inTheseValues and findTheseValues are vectors.  The values in inTheseValues 
% are what you want to find the indx for findTheseValues.
% For example, inTheseValues = (5 10 15 20 25 30); and findTheseValues = (20 25);
% then indx will return (4 5).

numberOfValues = length(findTheseValues);

indx=zeros(size(findTheseValues));

for k=1:numberOfValues,

  tmpArray = inTheseValues - findTheseValues(k);
  
  [i,j] = min(abs(tmpArray));

  indx(k)=j;

end

