This Matlab code is for paper: Secrecy Performance of the UAV enabled Cognitive Relay Network The pdf file of this paper at: https://ieeexplore.ieee.org/abstract/document/8644982 or: https://www.researchgate.net/profile/Dinh-C-Nguyen/publication/331264543_Secrecy_Performance_of_the_UAV_Enabled_Cognitive_Relay_Network/links/5d4401a24585153e59355732/Secrecy-Performance-of-the-UAV-Enabled-Cognitive-Relay-Network.pdf