% plot_Q - plot Pe for Matched Filter and suboptimum receiver

%% Set parameters
EsN0dB  = 0:0.1:10;         % range of Es over N0 values on dB scale
EsN0lin = dB2lin( EsN0dB ); % convert to linear scale

%% compute Pe
PeMf = Q( sqrt( 2 * EsN0lin ) );
PeSo = Q( sqrt( 4/3 * EsN0lin ) );

%% plot
semilogy( EsN0dB, PeMf, EsN0dB, PeSo)
xlabel( 'E_s/N_0 (dB)')
ylabel( 'Symbol Error Probability' );
grid

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