% plot_LinearModRect - test linear modulation with rectangular pulse

%% Parameters:
fsT      = 20;
Alphabet = [1,-1];
Priors   = 0.5*[1 1];
Pulse    = ones(1,fsT);   % rectangular pulse

%% symbols and Signal using our functions
Symbols = RandomSymbols(10, Alphabet, Priors);
Signal  = LinearModulation(Symbols,Pulse,fsT);
%% plot
tt = (0 : length(Signal)-1 )/fsT;
plot(tt, Signal)
axis([0 length(Signal)/fsT -1.5 1.5])
grid
xlabel('Time/T')
ylabel('Amplitude')

%% Store name of script for automated figure generation
ScriptName = mfilename;