Main Content

getResults

Class: Advisor.Application
Namespace: Advisor

Access Model Advisor analysis results

Description

Access Application object analysis results.

Results = getResults(app) provides access to Model Advisor analysis results.

example

Results = getResults(app,'IDs',componentIDs) provides access to Model Advisor analysis results for the model components specified by componentIDs. Model components are models that the root model references.

Examples

expand all

Create an Application object, run Model Advisor analysis, and get the results.

Create an Application object.

app = Advisor.Manager.createApplication();

Open the model and set the root analysis to RootModel.

% Open the model
openExample('sldemo_mdlref_basic');

% Set root model to sldemo_mdlref_basic model
RootModel = 'sldemo_mdlref_basic';

% Set the Application object root analysis
setAnalysisRoot(app,'Root',RootModel);

Run Model Advisor analysis.

run(app);

Get the analysis results.

getResults(app);

Input Arguments

expand all

Model Advisor application object, specified as an Advisor.Application object. You can use an Advisor.Application object to run Model Advisor checks on a model reference hierarchy. Create an Advisor.Application object by using the method Advisor.Manager.createApplication.

Component IDs, as specified as a cell array of IDs.

Data Types: cell

Output Arguments

expand all

Analysis results, returned as a cell array of ModelAdvisor.SystemResult objects.

Version History

Introduced in R2015b