%hPRACHDetectionResults Display PRACH detection results
%   hPRACHDetectionResults(SNRDB, NUMSUBFRAMES, P) plots the PRACH
%   detection probability P when testing at an SNR of SNRDB for a number of
%   subframes NSUBFRAMES.

%   Copyright 2010-2014 The MathWorks, Inc.

function hPRACHDetectionResults(SNRdB, numSubframes, P)

    figure;
    plot(SNRdB,P,'b-o','LineWidth',2,'MarkerSize',7);
    title(['Detection Probability for ', ... 
        num2str(numSubframes) ' subframe(s)'] );
    xlabel('SNRdB'); ylabel('Detection Probability');
    grid on;
    hold on;
    plot(-8.0,0.99,'rx','LineWidth',2,'MarkerSize',7);
    legend('Simulation Result', ...
        'Target 99% Probability','Location','SouthEast');
    axis([SNRdB(1)-0.1 SNRdB(end)+0.1 0.75 1.05]) 

end