function H = Get_Chn(Chn, BS_set, l,k, Sim)

%%%% -------------------------------------------------------------------------
%%% This function finds the channel matrix from the BSs stored in BS_set to user
%%% (l,k)
%%% BS_set = [c1 b1; c2 b2; c3 b3; ...]
%%%% -------------------------------------------------------------------------

H = [];

for row_idx = 1:size(BS_set,1)
    curr_cell = BS_set(row_idx,1);
    curr_BS = BS_set(row_idx,2);
    if curr_BS <= Sim.Num_Macro  %Macro BS
        H_temp = squeeze(Chn(curr_cell,curr_BS,:,l,k,:));
    else  %Pico BS
        H_temp = squeeze(Chn(curr_cell,curr_BS,1:Sim.Num_Ant_Pico,l,k,:));
    end
    
    H = [H;H_temp]; 
    
end

%H is the size of 
% row: number of antennas serving user (l,k)
% column: number of receive antennas