Main Content

target.add

Add target object to internal database

Description

example

objectsAdded = target.add(targetObject) adds the specified target object to an internal database and returns a vector that contains the added objects. By default, the target data is available only for the current MATLAB® session.

example

objectsAdded = target.add(targetObject, Name,Value) uses name-value arguments to controls persistence over MATLAB sessions and command-line output.

Examples

collapse all

To specify a hardware implementation that persists over MATLAB sessions, use the target.create and target.add functions.

myLangImp = target.create('LanguageImplementation', ...
                          'Name', 'MyLanguageImplementation', ...
                          'Copy', 'ARM Compatible-ARM Cortex');

myProc = target.create('Processor','Name','MyProcessor');
myProc.LanguageImplementations = myLangImp;
objectsAdded = target.add(myProc, ...
                          'UserInstall',true, ...
                          'SuppressOutput',true);

Input Arguments

collapse all

Specify the target object that you want to add to the internal database.

Example: target.add(myTargetObject);

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.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: target.add(myTargetObject, 'UserInstall', true);

Control persistence of target data in an internal database:

  • true –– Target data persists in internal database over multiple MATLAB sessions.

  • false –– Target data is in internal database only for the current MATLAB session.

Example: target.add(myTargetObject, 'UserInstall', 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 adds to internal database.

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

Data Types: logical

Output Arguments

collapse all

Target objects that the function adds to internal database.

Version History

Introduced in R2019a