Let m = 1. Write a MATLAB function (or class if you prefer), called rocPlot, that accepts two inputs, namely the SNR
value (in dB units) and the number of observation samples K, and plots the receiver operating characteristic (ROC)
curve for the given SNR and K values. In a MATLAB script, call the above function for SNRdB = {0, 2, 4, 6, 8, 10} and
K = {1,2,3,4}. For each value of the number of observation samples K, show all six curves for different values of
the SNR on the same plot, making sure to use a descriptive legend to distinguish the curves. Furthermore, for each
value of the SNR from the set SNRdB = {0, 4, 8}, show all four curves for different values of the number of observation
samples on the same plot, making sure to use a descriptive legend to distinguish the curves. Clearly specify the axis
labels and use titles to identify the value of the SNR or K for each graph.
Recall that the ROC curve should show the locus of the probability of detection (PD) versus the probability of false
alarm (PFA) for all possible decision threshold values Vr. Note that when the SNR is fixed, then the value of o can be
found as $\sigma = m/\sqrt{SNR}$, where m = 1. To plot each ROC curve for a specific value of SNR, the corresponding value
for $\sigma$ is found, the decision threshold Vr will be changed by covering all possible values of 0 < po <1, and the values
of PD and PFA are found for each possible threshold value V?.