function [yr,yi] = gen_MultiAnt_HDist ( N, gamma, lambdaC, lambdaI, r_min,dist,Par1,Par2,A,num_samples)
% Noise Generation: Two antenna receiver, One antenna transmitter

A = 1.0;
num_interferer = 50;
block_size = 10000;
B = ceil(num_samples/block_size);
yr = zeros(B*block_size,N);
yi = zeros(B*block_size,N);
if (length(lambdaI) == 1)
    lambdaI = lambdaI*ones(1,N);
end
if (length(lambdaI) > 1 && length(lambdaI) ~= N )
    lambdaI = lambdaI(1)*ones(1,N);
end

for b = 1:B
    d_CommonInt = r_min^2 + cumsum(random('exp',1/(lambdaC*pi),num_interferer,block_size));
    
    for n = 1:N
        theta_CommonInt = rand(size(d_CommonInt));
        d_ExclusiveInt = r_min^2 + cumsum(random('exp',1/(lambdaI(n)*pi),num_interferer,block_size));
        hC = myRandom(dist,Par1,Par2,size(d_CommonInt));
        hE = myRandom(dist,Par1,Par2,size(d_ExclusiveInt));
        yr((b-1)*block_size+1:b*block_size,n) = sum(A*(cos(2*pi*(theta_CommonInt - 0.5))).*(d_CommonInt.^(-gamma/4)).*hC,1) ...
            + sum(A*(cos(2*pi*(rand(size(d_ExclusiveInt)) - 0.5))).*(d_ExclusiveInt.^(-gamma/4)).*hE,1);
        yi((b-1)*block_size+1:b*block_size,n) = sum(A*(sin(2*pi*(theta_CommonInt - 0.5))).*(d_CommonInt.^(-gamma/4)).*hC,1) ...
            + sum(A*(sin(2*pi*(rand(size(d_ExclusiveInt)) - 0.5))).*(d_ExclusiveInt.^(-gamma/4)).*hE,1);
    end
end
