This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Replace blocks from previous releases with latest versions

    Note:   slupdate will be removed in a future release. The slupdate command can only upgrade some parts of your model. Use the Upgrade Advisor instead. See Model Upgrades.


slupdate('sys', prompt)
AnalysisResult = slupdate('sys', 'OperatingMode', 'Analyze')


slupdate('sys') replaces blocks in model sys from a previous release of Simulink® software with the latest versions. The slupdate function alone cannot perform all upgrade checks on your model. Use the Upgrade Advisor to access the slupdate checks and also advice and fixes for all other upgrade checks. See Model Upgrades.

    Note   Best practice is to first open the model, and press CTRL+D to update the model, before you call slupdate.

slupdate('sys', prompt) specifies whether to prompt you before replacing a block. If prompt equals 1, the command prompts you before replacing the block. The prompt asks whether you want to replace the block. Valid responses are

  • y

    Replace the block (the default).

  • n

    Do not replace the block.

  • a

    Replace this and all subsequent obsolete blocks without further prompting.

If prompt equals 0, the command replaces all obsolete blocks without prompting you.

In addition to replacing obsolete blocks, slupdate

  • Reconnects broken links to masked blocks in libraries provided by MathWorks to ensure that the model reflects changes made to the blocks in this release. This will overwrite any custom changes you made to the masks of these blocks.

  • Updates obsolete configuration settings for the model.

AnalysisResult = slupdate('sys', 'OperatingMode', 'Analyze') performs only the analysis portion without updating or changing the model. This command analyzes referenced models, linked libraries, and S-functions, and then returns a data structure with the following fields:

  • Message — character vector containing a message summarizing the results

  • blockList — cell array listing blocks that need to be updated

  • blockReasons — cell array listing reasons for updating the corresponding blocks

  • modelList — cell array listing referenced models and the parent model

  • libraryList — cell array listing non-MathWorks libraries referenced

  • configSetList — for internal use

  • sfunList — cell array listing S-functions referenced

  • sfunOK — logical array representing S-function status, where false indicates that an S-function needs updating and true indicates otherwise

  • sfunType — cell array listing apparent S-function type (e.g., .mex)

Introduced before R2006a

Was this topic helpful?