1
clc
clear all
close all
dth_dB_vec = -5:5:15
epsilon = 5
v = 4
qp = 4
var = 10
Mp = 2^(qp)
Detection_per_vec = [];
for i = 1:length(dth_dB_vec)
    dthdB = dth_dB_vec(i);
    dth_Natural = 10^(dthdB/10);
    Detection_per = 0;
    Pfa = 1-(gamcdf(dth_Natural,Mp,(Mp/2*v*epsilon*var)));
    Detection_per = Pfa
    Detection_per_vec = [Detection_per_vec Detection_per];
end
figure(1)
semilogy(dth_dB_vec, Detection_per_vec,'--b')
hold on 
grid on
ylabel('Probability')
xlabel('Detection threshold [dB over noise level')

I'm attempting to graph the FA rate of the gamma CDF function but I don't know where I went wrong when the resulting vector only returns 1's. The wanted graph is curved down with each iteration of the dth_dB_vec. All the parameters are correct. Here is the original Mathematical formula. False Alarm formula. Thank you for your help

0 Answers0