Main Content

setAnalysisRoot

Class: Advisor.Application
Package: Advisor

Specify model hierarchy for Model Advisor analysis

Description

Specify the model hierarchy for an Application object analysis.

example

setAnalysisRoot(app,'Root',root) specifies the analysis root.

example

setAnalysisRoot(app,'Root',root,Name,Value) specifies the analysis root using Name,Value options.

Input Arguments

expand all

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

Comma-separated Name,Value argument specifying model or subsystem path

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.

Examples

expand all

This example shows how to set the root model, create an Application object, and set the root analysis.

% Open the model
openExample('sldemo_mdlref_basic');

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

% Create an Application object
app = Advisor.Manager.createApplication();

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

This example shows how to set the root model, create an Application object, and specify a subsystem as the analysis root.

% Open the model
openExample('sldemo_mdlref_basic');

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

% Create an Application object
app = Advisor.Manager.createApplication();

% Set the Application object root analysis
setAnalysisRoot(app,'Root','sldemo_mdlref_basic/CounterA','RootType','Subsystem');

Version History

Introduced in R2015b