Introduction - If you have any usage issues, please Google them yourself
ofdm Theroretical ecpression of Probability of Detection refer above reference.
thresh = (qfuncinv(Pf)./sqrt(L))+ 1
Pd_the = qfunc(((thresh - (snr + 1)).*sqrt(L))./(sqrt(2).*(snr + 1)))
plot(Pf, Pd_the, r- )
xlabel( probability of false alarm )
ylabel( probability of detection )
hold on
grid on