Documentation

linqueryIsBlockSubstituted

Query object for finding blocks that have custom block linearizations specified

Description

linqueryIsBlockSubstituted creates a custom query object for finding all the blocks in a linearization result that have custom block linearizations specified.

When you linearize a Simulink® model, you can create a LinearizationAdvisor object that contains diagnostic information about individual block linearizations. To find block linearizations that satisfy specific criteria, you can use the find function with custom query objects. Alternatively, you can analyze linearization diagnostics using the Linearization Advisor in the Linear Analysis Tool. For more information on finding specific blocks in linearization results, see Find Blocks in Linearization Results Matching Specific Criteria.

Creation

Syntax

query = linqueryIsBlockSubstituted

Description

example

query = linqueryIsBlockSubstituted creates a query object for finding all the blocks in a LinearizationAdvisor object that have custom block linearization specified.

Properties

expand all

Query type, specified as 'Block Substituted'.

Query description, specified as 'Blocks Linearized with Block Substitution'. You can add your own description to the query object using this property.

Usage

After creating a linqueryIsBlockSubstituted query object, you can:

  • Find all the blocks in a LinearizationAdvisor object that have a custom linearization specified by using the linqueryIsBlockSubstituted query directly with the find command.

  • Create a CompoundQuery object by logically combining the linqueryIsBlockSubstituted query with other query objects.

Object Functions

findFind blocks in linearization results that match specific criteria

Examples

expand all

Load the Simulink model.

mdl = 'scdpwmCustom';
load_system(mdl)

Linearize the model and obtain the LinearizationAdvisor object.

opts = linearizeOptions('StoreAdvisor',true);
[sys,op,info] = linearize(mdl,getlinio(mdl),opts);
advisor = info.Advisor;

Create query object, and find all blocks with substitute linearizations.

qSub = linqueryIsBlockSubstituted;
advSub = find(advisor,qSub)
advSub = 
  LinearizationAdvisor with properties:

               Model: 'scdpwmCustom'
      OperatingPoint: [1x1 opcond.OperatingPoint]
    BlockDiagnostics: [1x1 linearize.advisor.BlockDiagnostic]
           QueryType: 'Block Substituted'

Alternative Functionality

App

You can also create custom queries for finding specific blocks in linearization results using the Linearization Advisor in the Linear Analysis Tool. For more information, see Find Blocks in Linearization Results Matching Specific Criteria.

Introduced in R2017b

Was this topic helpful?