Main Content


Export tracker or track fuser to Simulink model


exportToSimulink(obj) exports the tracker or track fuser object obj as a corresponding Simulink® block to a new Simulink model. The new model uses a default name.


exportToSimulink(obj,Name=Value) specifies options using one or more name-value arguments. For example, exportToSimulink(obj,BlockName="myBlock") specifies the name of the model as myBlock.

blockHandle = exportToSimulink(___) returns the handle of the exported block.


collapse all

Create a GNN tracker with its index set to 2.

tracker = trackerGNN(TrackerIndex=2);

Export the tracker to Simulink. Set the model name as Example, and set the block name as Vehicle Tracker.

blockHandle = exportToSimulink(tracker,Model="Example",BlockName="Vehicle Tracker")
blockHandle = 6.0007

A new Simulink model named Example appears, which contains a Global Neighbor Nearest Multi Object Tracker Simulink block.


Input Arguments

collapse all

Tracker or fuser object, specified as a trackerGNN, trackerJPDA, trackerTOMHT, trackerPHD, or trackFuser object.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: exportToSimulink(obj,Name="myModel")

Model name or handle, specified as a string, a character vector, or a Simulink handle. You can specify the model either using the model name in the format of a string or a character vector, or using a valid Simulink handle in the format of a double number. If no Simulink model with the specified name exists, the function creates a new model with the specified name.

Example: "NewModel"

Data Types: double | string | character

Name of the exported Simulink block, specified as a string scalar or a character vector.

Example: "myBlock"

Position of the exported block in the Simulink model, in pixels, specified as a 1-by-4 vector of nonnegative real numbers in the form [left top right bottom].

Example: [10 100 110 0]

Data Types: single | double

Indicator of whether the model is open after exporting the tracker or fuser to the model, specified as a logical 1 (true) or 0 (false).

Data Types: logical

Output Arguments

collapse all

Numeric handle of the exported block, returned as a numeric scalar.

Data Types: double

Version History

Introduced in R2022a