output
Get current state of track logic
Description
returns the recent history updates of the track history logic object,
history
= output(historyLogic
)historyLogic
.
returns in scores
= output(scoreLogic
)scores
the current score and maximum score of track score
logic object, scoreLogic
.
Examples
Get Recent History of History-Based Logic
Create a history-based logic. Specify confirmation threshold values Mc and Nc as the vector [3 5]. Specify deletion threshold values Md and Nd as the vector [6 7].
historyLogic = trackHistoryLogic('ConfirmationThreshold',[3 5], ... 'DeletionThreshold',[6 7]);
Get the recent history of the logic. The history vector has a length of 7, which is the greater of Nc and Nd. All values are 0
because the logic is not initialized.
h = output(historyLogic)
h = 1x7 logical array
0 0 0 0 0 0 0
Initialize the logic, then get the recent history of the logic. The first element, which indicates the most recent update, is 1.
init(historyLogic); h = output(historyLogic)
h = 1x7 logical array
1 0 0 0 0 0 0
Update the logic with a hit, then get the recent history of the logic.
hit(historyLogic); h = output(historyLogic)
h = 1x7 logical array
1 1 0 0 0 0 0
Get Current Score of Score-Based Logic
Create a score-based logic with default confirmation and deletion thresholds.
scoreLogic = trackScoreLogic;
Get the current and maximum score of the logic. Both scores are 0
because the logic is not initialized.
s = output(scoreLogic)
s = 1×2
0 0
Specify the volume of a sensor detection bin (volume
), and the new target rate in a unit volume (beta
). Initialize the logic using these parameters and the default probabilities of detection and false alarm. The first update to the logic is a hit.
volume = 1.3; beta = 0.1; init(scoreLogic,volume,beta);
Get the current and maximum score of the logic.
s = output(scoreLogic)
s = 1×2
11.6699 11.6699
Update the logic with a miss, then get the updated scores.
miss(scoreLogic) s = output(scoreLogic)
s = 1×2
9.3673 11.6699
Input Arguments
historyLogic
— Track history logic
trackHistoryLogic
Track history logic, specified as a trackHistoryLogic
object.
scoreLogic
— Track score logic
trackScoreLogic
object
Track score logic, specified as a trackScoreLogic
object.
Output Arguments
history
— Recent history
logical vector
Recent track history of historyLogic
, returned as a logical
vector. The length of the vector is the same as the length of the History
property of the historyLogic
. The first element is the most recent
update. A true
value indicates a hit and a false
value indicates a miss.
scores
— Current and maximum scores
1-by-2 numeric vector
Current and maximum scores of scoreLogic
, returned as a 1-by-2
numeric vector. The first element specifies the current score. The second element
specifies the maximum score.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2018b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)