Main Content

target.upgrade

Upgrade existing definitions of hardware devices

Description

target.upgrade(upgraderForRegistrationMechanism, pathToRegistrationFile) uses an upgrade procedure to create objects from data definitions in current artifacts. The function creates registerUpgradedTargets.m in the current working folder.

To register the upgraded data definitions with MATLAB®, run registerUpgradedTargets().

For persistence across MATLAB sessions, run registerUpgradedTargets('UserInstall', true).

target.upgrade(___, Name,Value) specifies additional options using one or more name-value pair arguments.

Examples

Upgrade Hardware Device Data Definitions

For a workflow example that uses the function, see Upgrade Data Definitions for Hardware Devices.

Input Arguments

collapse all

Select upgrade procedure for current registration mechanism.

Specify file that contains current registration mechanism.

Example: target.upgrade('rtwTargetInfo', 'myPath/mySubfolder/rtwTargetInfo.m')

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.upgrade('rtwTargetInfo', 'myPath/mySubfolder/rtwTargetInfo.m','ExportFileName','myNewFile')

  • true –– Generate a MATLAB function that registers the upgraded definitions using target.add.

  • false –– Do not generate a function.

If ExportToMATLABFunction is true, the argument specifies the file name of the generated MATLAB function . Otherwise, the argument is ignored.

  • true –– If the file specified by ExportFileName exists, overwrite the file.

  • false –– If the file specified by ExportFileName exists, the function produces an error.

If ExportToMATLABFunction is false, the argument is ignored.

Version History

Introduced in R2019b