Main Content

target.get

Retrieve target objects from internal database

Since R2019a

Description

example

targetObject = target.get(targetType, targetObjectId) retrieves a target object from an internal database.

tFOList = target.get(targetType) returns a list of targetType objects that are stored in the internal database.

example

tFOList = target.get(targetType, Name, Value) returns a list of targetType objects that have properties that match the name-value pairs.

Examples

collapse all

This example shows how you can remove a target.LanguageImplementation object associated with an object identifier, myLanguageImplementationID.

Retrieve the object from the internal database.

objectToRemove = target.get('LanguageImplementation', myLanguageImplementationID);

Remove the object.

target.remove(objectToRemove);

This example shows how to create a target.Board object that provides MATLAB® with a description of processor attributes. It uses target.get to retrieve the description of a supported processor.

Create a board object.

hostTarget = target.create('Board', 'Name', 'Host Intel processor');

Specify the processor for the board by reusing a supported processor.

hostTarget.Processors = target.get('Processor', ...
                                   'Intel-x86-64 (Linux 64)'); 

Input Arguments

collapse all

Specify the class of the object that you want to retrieve. For example, to retrieve:

  • A target.Processor object, specify 'Processor'.

  • A target.LanguageImplementation object, specify 'LanguageImplementation'.

For the list of supported classes, see target Package.

Specify the unique identifier of the object that you want to retrieve, that is, the Id property value of the object.

Output Arguments

collapse all

Retrieved target object. For example:

  • If targetType is 'Processor', the returned object is a target.Processor object.

  • If targetType is 'LanguageImplementation', the returned object is a target.LanguageImplementation object.

For the list of supported classes, see target Package.

List of retrieved target objects.

Version History

Introduced in R2019a