% plot_Constellation16QAM - plot 16-QAM constellation

% use kronecker product to construct 16 point constellation
Temp = kron([-3:2:3],ones(4,1));
Alphabet = reshape( Temp + j*Temp.', 1, [ ] );

%% unit circle for reference
Nphi = 200;
phi = ( 0 : Nphi ) * 2*pi/Nphi;
plot( exp(j*phi),'b--')

%% plot constellation
hold on
hp = plot( Alphabet, 'ro');
hold off
xlabel( 'Real' )
ylabel( 'Imaginary' )
grid

%% tweaks
axis( 'equal' )
set( gca, 'YTick', [-3 -2 -1 0 1 2 3] );
set( gca, 'YTickLabel', ['-3A' ; '-2A' ;'-A '; ' 0 '; ' A '; '2A '; '3A '] );
set( gca, 'XTick', [-3 -2 -1 0 1 2 3] );
set( gca, 'XTickLabel', ['-3A' ; '-2A' ;'-A '; ' 0 '; ' A '; '2A '; '3A '] );
set( hp, 'MarkerSize', 10, 'LineWidth', 1 );

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