Summary: This code coverts a set of binary words to a set of complex symbols through the use of decimal indexing of a word-to-symbol map. 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.
%% Words to Symbols
function symbols = w2sym(words, word_to_symbol_map, bits_per_symbol)
%%
num_subcarriers = size(words,1);
symbols = zeros(1,num_subcarriers);
for n=1:num_subcarriers
symbols(1,n) = word_to_symbol_map(binvec2dec(fliplr(words(n, 1:bits_per_symbol)))+1);
end
end