Initialize track logic with first hit
init( initializes the track
history logic with the first hit.
initializes the track score logic with the first hit, using default probabilities of
detection and false alarm.
Initialize History-Based Logic
Create a history-based logic with default confirmation and deletion thresholds.
historyLogic = trackHistoryLogic
historyLogic = trackHistoryLogic with properties: ConfirmationThreshold: [2 3] DeletionThreshold: [6 6] History: [0 0 0 0 0 0]
Initialize the logic, which records a hit as the first update to the logic.
init(historyLogic) history = historyLogic.History; disp(['History: [',num2str(history),'].']);
History: [1 0 0 0 0 0].
Initialize Score-Based Logic
Create a score-based logic with default confirmation and deletion thresholds.
scoreLogic = trackScoreLogic
scoreLogic = trackScoreLogic with properties: ConfirmationThreshold: 20 DeletionThreshold: -5 Score: 0 MaxScore: 0
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 (
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.
Display the current and maximum score of the logic. Since the logic has been updated once, the current score is equal to the maximum score.
currentScore = scoreLogic.Score
currentScore = 11.6699
maximumScore = scoreLogic.MaxScore
maximumScore = 11.6699
historyLogic — Track history logic
Track history logic, specified as a
scoreLogic — Track score logic
Track score logic, specified as a
volume — Volume of sensor detection bin
Volume of sensor detection bin, specified as a nonnegative scalar. For example, a 2-D radar will have a sensor bin volume of (azimuth resolution in radians) * (range) * (range resolution).
beta — Rate of new targets in unit volume
Rate of new targets in unit volume, specified as a nonnegative scalar.
pd — Probability of detection
0.9 (default) | nonnegative scalar
Probability of detection, specified as a nonnegative scalar.
pfa — Probability of false alarm
1e-6 (default) | nonnegative scalar
Probability of false alarm, specified as a nonnegative scalar.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2018b