%% Update Score Logic with Miss
% Create a score-based logic with default confirmation and deletion thresholds.

scoreLogic = trackScoreLogic;

% Specify the probability of detection (pd), the probability of false alarm (pfa), the volume of a sensor detection bin (volume), and the new target rate in a unit volume (beta).

pd = 0.9;
pfa = 1e-6;
volume = 1.3;
beta = 0.1;

% Initialize the logic using these parameters. The first update to the logic is a hit.

init(scoreLogic,volume,beta,pd,pfa);
disp(['Score and MaxScore: ', num2str(output(scoreLogic))]);

% Update the logic with a miss. The current score decreases, but the maximum score does not change.

miss(scoreLogic,pd,pfa)
disp(['Score and MaxScore: ', num2str(output(scoreLogic))])

% Copyright 2018 The MathWorks, Inc.