Main Content

hit

Update track logic with subsequent hit

Description

example

hit(historyLogic) updates the track history with a hit.

Examples

collapse all

Create a history-based logic with the default confirmation and deletion thresholds.

historyLogic = trackHistoryLogic;

Initialize the logic, which records a hit as the first update to the logic. The first element of the 'History' property, which indicates the most recent update, is 1.

init(historyLogic)
history = historyLogic.History;
disp(['History: [',num2str(history),'].']);
History: [1  0  0  0  0  0].

Update the logic with a hit. The first two elements of the 'History' property are 1.

hit(historyLogic)
history = historyLogic.History;
disp(['History: [',num2str(history),'].']);
History: [1  1  0  0  0  0].

Input Arguments

collapse all

Track history logic, specified as a trackHistoryLogic object.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2020a