% plot_DMFIQ - scatter plot of DMF input and output

%% set parameters
SimpleSetParameters;

%% system simulation
[NumErrors, ResultsStruct] = MCSimple( Parameters );

%% scatter plot of DMF input and output
InSig  = ResultsStruct.Received;
OutSig = ResultsStruct.MFOut;

% input signal
subplot( 2, 1, 1 )
plot( InSig, '.' )
axis( 'equal' )
xlabel( 'Real Part' )
ylabel( 'Imag. Part')
title( 'DMF Input' )
grid

subplot( 2, 1, 2 )
plot( OutSig, '.')
hold on
plot( complex(ResultsStruct.Scale*Parameters.Alphabet), 'ro')
hold off
axis( 'equal' )
xlabel( 'Real Part' )
ylabel( 'Imag. Part')
title( 'DMF Output' )
grid

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