%hCarrierAggregationModulate Modulate carriers
%   OUT = hCarrierAggregationModulate(IN,SR,F) is the modulated component
%   carrier IN given a sampling rate SR and modulation frequency F.

%   Copyright 2011-2014 The MathWorks, Inc.

function out = hCarrierAggregationModulate(in,sr,f)

    % Create vector of time samples
    t = ((0:size(in,1)-1)/sr).';   
    
    % For each antenna, apply the frequency offset correction
    out = zeros(size(in));
    for i = 1:size(in,2)
        out(:,i) = in(:,i).*exp(1i*2*pi*f*t);
    end
    
end
