Main Content


Add target object to internal database



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.


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


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, ...

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 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.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.

Introduced in R2019a