% plot_OQPSKRaisedCosIF - plot upconverted OQPSK signal

%% Parameters:
fsT      = 20;
L        = 10;
Alphabet = [1,-1];                          % BPSK
Priors   = ones( size( Alphabet) ) / length(Alphabet);
Ns       = 20;                              % number of symbols
Pulse    = RaisedCosPulse( L, fsT, 0.5);    % RC pulse
fc       = 2;                               % carrier frequency 2/T

%% symbols and Signal using our functions
Symbols  = RandomSymbols(Ns, Alphabet, Priors);
Symbols  = OQPSK(Symbols);
Signal   = LinearModulation(Symbols,Pulse,fsT);
tt       = (0 : length(Signal)-1 )/fsT;
IFSignal = real( exp( j*2*pi*fc*tt) .* Signal );
%% plot
plot(tt, IFSignal, tt(1:fsT:end),  IFSignal(1:fsT:end), 'ro')
grid
xlabel('Time/T')
ylabel('Amplitude')
axis([5 15 -1.5 1.5] );

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