Introduction - If you have any usage issues, please Google them yourself
This code plots the receiver operating characteristics (ROC) curve for Rayleigh channel. The formulas for the probability of detection and the probability of false alarm are taken the following paper:
Digham, F.F. Alouini, M.-S. Simon, Marvin K., On the Energy Detection of Unknown Signals Over Fading Channels, Communications, IEEE Transactions on , vol.55, no.1, pp.21,24, Jan. 2007.