Main Content

getResults

Class: Advisor.Application
Package: 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,Name,Value)

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

Advisor.Application object, created by Advisor.Manager.createApplication

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.

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