target.add - Add target object to internal database - MATLAB (original) (raw)

Add target object to internal database

Syntax

Description

[objectsAdded](#mw%5Fac62582e-9f30-4fd9-808d-a512064ff8f5) = target.add([targetObject](#mw%5Fb837f43d-2ee3-48a6-96a4-f9c2bd69aa9b)) 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](#mw%5Fac62582e-9f30-4fd9-808d-a512064ff8f5) = target.add([targetObject](#mw%5Fb837f43d-2ee3-48a6-96a4-f9c2bd69aa9b), [Name,Value](#namevaluepairarguments)) uses name-value arguments to control persistence over MATLAB sessions and command-line output.

example

Examples

collapse all

Specify Hardware Implementation

To specify a hardware implementation that persists over MATLAB sessions, use the target.create andtarget.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

targetObject — Target object

object

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 asName1=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);

UserInstall — Target data persistence

false (default) | true

Control persistence of target data in an internal database:

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

Data Types: logical

SuppressOutput — Control command-line output

false (default) | true

Control command-line output of function:

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

Data Types: logical

Output Arguments

collapse all

objectsAdded — Objects added

object vector

Target objects that the function adds to internal database.

Version History

Introduced in R2019a