Summary: This code converts a group of complex symbols to a single complex baseband OFDM period in the time domain. Equivalently, it can be thought of as a parallel to serial operation while simultaneously modulating all the subcarriers by their complex amplitude. NOTE: The MATLAB library was used in the initial version of the design but has since been replaced by an updated LabVIEW module. Please see the LabVIEW portion of the transmitter for the most current version.
%% Symbols to FFT
function [re im] = sym2fft(symbols, size_of_fft)
%%
num_subcarriers = size(symbols,2);
input = [ 0 symbols(1:(num_subcarriers/2)) zeros(1,size_of_fft-num_subcarriers-1) symbols((num_subcarriers/2)+1:num_subcarriers) ];
output = ifft(input);
re = real(output);
im = imag(output);
end