Main Content

target.remove

Remove target object from internal database

Description

example

target.remove(targetObject) removes the target object from an internal database.

target.remove(targetType, targetObjectId) removes the target object specified by class and identifier.

target.remove(targetObject, Name,Value) uses name-value arguments to remove associated objects and suppress command-line output.

Examples

collapse all

You can specify and add a hardware device implementation to an internal database.

armv8 = target.create('LanguageImplementation', ...
              'Name', 'Armv8-A LP64', ...
              'Copy', 'ARM Compatible-ARM Cortex');

a53 = target.create('Processor', ...
                    'Name', 'Cortex-A53', ...
                    'Manufacturer', 'ARM Compatible');

a53.LanguageImplementations = armv8;

target.add(a53)

When a target object is no longer required, you can use the function to remove the object from the internal database.

To remove only the target.Processor object, run:

target.remove(a53)

Or:

target.remove('Processor', 'ARM Compatible-Cortex-A53');

To remove the target.Procesor object and its associated target.LanguageImplementation object and suppress the command-line output, run:

target.remove(a53, ...
              'IncludeAssociations', true, ...
               'SuppressOutput',true);

Input Arguments

collapse all

Specify the target object that you want to remove.

Specify the class of the target object that you want to remove. For example:

  • If the class is target.Processor, specify 'Processor'.

  • If the class is target.LanguageImplementation, specify 'LanguageImplementation'.

Example: 'Processor'

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

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: target.remove(myTargetObject, 'IncludeAssociations', true);

Remove associated objects from internal database:

  • true –– Function removes targetObject and associated target objects from the internal database. If an associated object is referenced by another target object, the function does not remove the associated object.

  • false –– Function removes only targetObject from the internal database.

Example: target.remove(myTargetObject, 'IncludeAssociations', true);

Data Types: logical

Control command-line output of function:

  • true –– Suppress command-line output from the function.

  • false –– Provide information about the objects that the function removes from the internal database.

Example: target.remove(myTargetObject, 'SuppressOutput', true);

Data Types: logical

Introduced in R2019a