function values = get_antenna_values(E,N,A,enh)
% GET_ANTENNA_VALUES returns antenna excitation values read from the
% aperture image
%   E:      east coordinates of aperture in meshgrid
%   N:      north coordinates of aperture in meshgrid
%   A:      Aperture image
%   enh:    east, north, height coordinates of antennas in the array

    x_pos = enh(:,1);
    y_pos = enh(:,2);
    
    x_idx = zeros(size(y_pos));
    y_idx = zeros(size(y_pos));
    
    for pos_idx = 1:length(x_pos)
        x_find = x_pos(pos_idx);
        y_find = y_pos(pos_idx);
        
        dist = (E-x_find).^2 + (N-y_find).^2;
        [~,idx] = min(dist(:));
        x_idx(pos_idx) = idx;
    end
    values = A(x_idx);
end

