function sp=upconvert(msg, fc, fs)
% upconvert - convert complex envelope signal to passband signal
%
% The complex envelope message signal msg is converted to a passband signal
% using reference frequency fc.
%
% Inputs:
%   msg: vector of complex envelope samples
%   fc: reference/carrier frequency (must be less than fs/2)
%   fs: sample rate
%
% Output:
%   sp: upconverted, passband signal
%
% Usage:
%   sp=upconvert(msg, fc, fs)

tt=(0:length(msg)-1)/fs;
sp = real(msg.*exp(2j*pi*fc*tt));
