主要内容

sysobjupdate

更新customSystem objectto latest syntax

Description

example

sysobjupdateobjectopens the System object™ in the MATLAB®Editor and applies syntax changes without saving.

sysobjupdatefolderopens any System object or objects found in the folder that need updating. The affected objects are opened in the Editor and syntax changes are applied without saving.

sysobjupdate包裹opens the System object or objects associated with the package in the editor and applies syntax changes without saving.

example

sysobjupdate___-inplaceupdates and saves syntax changes toobject. No files are opened in the editor, but backup copies of the System object files are created with the suffix_orig.m. This syntax can be used with any of the previous arguments.

sysobjupdate___-inplace -nobackup执行对系统对象的更新,但不会创建系统对象文件的备份副本。

sysobjupdate___-diffupdates like the-inplaceupdate argument, but also opens theVisdifftool to compare the changed files.

sysobjupdate___-pre命令runs a command before updating the System object.

sysobjupdate___-post命令runs a command after updating the System object.

sysobjupdate___-actionsActionKeyapplies only the syntax updates listed asActionKeykeywords.

sysobjupdate -listactionslists all possible actions available for the-actions选项。

example

info= sysobjupdate(___)返回一个结构数组,列出了已更新的系统对象文件,并列出了未更新的语法警告。您可以使用任何以前的输入参数。输入参数必须列为逗号分隔的字符向量。

Examples

collapse all

更新AddOneSystem object. If any changes are needed,AddOneis opened in the MATLAB Editor with the changes applied but not saved.

sysobjupdateAddOne

更新文件夹中的所有系统对象参考不打开MATLAB中的所有对象。跑步后,sysobjupdatelists the objects that needed syntax updates.

sysobjupdatec:\ files \ reference-inplace
更新d System objects: digitalDelay analogDelay

更新柜台System object in place and also handle thegitversion control for the柜台.mfile. Aninfo结构体is returned with the System objects that were updated and with any warning messages resulting from those updates.

info = sysobjupdate('Counter','-inplace','-pre',...'git add','-post','git commit')
info =带有字段的结构:class:'counter'消息:[0×1字符串]

Input Arguments

collapse all

System object or objects to update to the newest System object authoring syntax. The object or folder must be on the MATLAB path.

Example:柜台

Example:c:\ documents \ matlab \ mysystemobjects\Counter.m

Folder of System objects to update to the newest System object authoring syntax. The folder must be on the MATLAB path.

Example:c:\ documents \ matlab \ mysystemobjects

System object package to update to the newest System object authoring syntax. The package or folder must be on the MATLAB path.

Example:+delays

Example:C:\Documents\MATLAB\+delays\

在更新系统对象文件之前或之后需要运行命令时,请使用此选项。

Running a command is useful when you want to update all your System objects in place with the-inplace命令, but you also need to run version control commands to save the changes to the object.

Example:gitadd

Example:gitcommit

Keyword for the-action选项。Usesysobjupdate -listactions列出所有可能的操作关键字。

Example:ObsoleteMixinRemoval

Output Arguments

collapse all

更新期间,每个文件遇到的更新文件和任何警告的结构。

Version History

Introduced in R2020b