You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: plotROCkpm.m
    path of file: ./repos/bnt/KPMtools
    
    the code of the file until where you have to start completion: function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin)
% You pass the scores and the classes, and the function returns the false
% alarm rate and the detection rate for different points across the ROC.
%
% [faR, dR] = plotROC(score, class)

    
function [falseAlarmRate, detectionRate, area, th] = plotROC(confidence, testClass, col, varargin)
% You pass the scores and the classes, and the function returns the false
% alarm rate and the detection rate for different points across the ROC.
%
% [faR, dR] = plotROC(score, class)
%
%  faR (false alarm rate) is uniformly sampled from 0 to 1
%  dR (detection rate) is computed using the scores.
%
% class = 0 => target absent
% class = 1 => target present
%
% score is the output of the detector, or any other measure of detection.
% There is no plot unless you add a third parameter that is the color of
% the graph. For instance:
% [faR, dR] = plotROC(score, class, 'r')
%
% faR, dR are size 1x1250

if nargin < 3, col = []; end