% OFDMSetParameters - set comms parameters for OFDM simulation
%
% This script sets a structure named Parameters to be used by 
% the system simulator.

%% Parameters
% construct structure of parameters to be passed to system simulator
% communications parameters
Parameters.fs  = 1e6;         % bandwidth (= sampling rate)
Parameters.Nc  = 256;         % number of subcarriers; block size
Parameters.Nb  = 64;          % number of blocks
Parameters.Lp  = 8;           % length of cyclic prefix
Parameters.Es  = 1;           % normalize received symbol energy to 1 (0dB)
Parameters.EsOverN0 = 10;     % Signal-to-noise ratio (Es/N0)
Parameters.Alphabet = [1 -1]; % BPSK

% equally likely priors
Parameters.Priors   = ones( size( Parameters.Alphabet) )/ ...
    length( Parameters.Alphabet ); 

% derived parameters
Parameters.T   = (Parameters.Nc + Parameters.Lp)/Parameters.fs; % symbol period
Parameters.fsT = Parameters.Nc + Parameters.Lp;      % samples/symbol
Parameters.NSymbols = Parameters.Nc * Parameters.Nb; % total symbols