Main Content

Simulink.sfunction.Analyzer class

Package:Simulink.sfunction
Superclasses:

创建一个仿真软件功万博1manbetx能分析仪对象

Description

This class enables you to perform checks on S-functions within a model or a library. These checks include MEX compiler setup check, source code check, MEX-file check, parameter robustness check for S-functions. The check result can be accessed either from a MATLAB®structure or an HTML report.

The S-function analyzer checks the source code of the S-functions based on the S-function names. The S-function source code can be automatically included in the analysis if the source file is a single .c or .cpp file in the MATLAB path that has the same name as the S-function. Otherwise, the build information can be specified through the S-function Analyzer APIs. If no source code is available on the specified path, the analysis is skipped.

Construction

sfunAnalyzer= Simulink.sfunction.Analyzer(model)creates aSimulink.sfunction.Analyzerobject with the model you specify. In this case, the source code for the S-function can be automatically included in the analysis if the source code file is a single .c or .cpp file in the MATLAB path that has the same name as the S-function. For example, if the specified model contains an S-function calledmysfun, and the source file formysfun是一个文件mysfun.cin the MATLAB path, aSimulink.sfunction.analyzer.BuildInfoobject is automatically created and included in the analysis.

sfunAnalyzer= Simulink.sfunction.Analyzer(model,'BuildInfo',{bdInfo})creates aSimulink.sfunction.Analyzerobject with the model and aSimulink.sfunction.analyzer.BuildInfoobject namedbdInfo.

sfunAnalyzer= Simulink.sfunction.Analyzer(model,'Options',{opts})creates aSimulink.sfunction.Analyzerobject with the model and aSimulink.sfunction.analyzer.Optionsobject namedopts.

Input Arguments

expand all

Names of the model in the path, specified as a string or character vector.

Name-Value Pair Arguments

Specify optional comma-separated pairs ofName,Valuearguments.Nameis the argument name andValueis the corresponding value.Namemust appear inside quotes. You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN.

Example:'BuildInfo', {buildInfo}

A cell array ofbuildinfoobjects. SeeSimulink.sfunction.analyzer.BuildInfofor more information.

An object to specify S-function analyzer running options. These checks includePolyspace®Code Prover™and parameter robustness checks. SeeSimulink.sfunction.analyzer.Optionsfor more information.

Methods

generateReport Generate an HTML report of S-function checks
run Perform checks on S-functions
Introduced in R2017b