selectComponents

Class: Advisor.Application
Package: Advisor

Select model components for Model Advisor analysis

Description

You can select model components for Model Advisor analysis. A model component is a model in the system hierarchy. Models that the root model references and that Advisor.Application.setAnalysisRoot specifies are model components. By default, all components are selected.

example

selectComponents(app) includes all components for Model Advisor analysis.

example

selectComponents(app,Name,Value) includes model components specified by Name,Value pair arguments for Model Advisor analysis.

Input Arguments

expand all

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

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Components to select for Model Advisor analysis, as specified by a cell array of IDs

Data Types: cell

Select components specified by IDs and component children from Model Advisor analysis.

Data Types: logical

Examples

expand all

This example shows how to set the root model, create an Application object, set root analysis, and include model components in Model Advisor analysis.

% 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);

% Select all components
selectComponents(app);

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

% 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);

% Select component using IDs
selectComponents(app,'IDs',RootModel);
Introduced in R2015b