% plot_GMSKTrajectory - complex plane signal trajectory for GMSK

%% Parameters:
fsT      = 20;
L        = 6;
BT       = 0.3;
Alphabet = [1,-1];                          % 2-PAM
Priors   = ones( size( Alphabet) ) / length(Alphabet);
Ns       = 200;                             % number of symbols
Pulse    = GaussPulse(L, BT, fsT);          % Gaussian pulse
A        = 1;                               % amplitude
h        = 0.5;                             % modulation index

%% symbols and Signal using our functions
Symbols = RandomSymbols(Ns, Alphabet, Priors);
Signal  = CPM(Symbols, A, h, Pulse,fsT);
%% plot

plot( real( Signal( (L-1)*fsT/2+1:end-(L-1)*fsT/2) ), imag( Signal( (L-1)*fsT/2+1:end-(L-1)*fsT/2) ), ...
    real( Signal( L*fsT:fsT:end-L*fsT ) ), imag( Signal( L*fsT:fsT:end-L*fsT ) ), 'ro')
grid
xlabel('Real')
ylabel('Imaginary')
axis('equal')

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