Main Content

linqueryAllBlocks

Query object for finding all linearized blocks

Description

linqueryAllBlocks creates a custom query object for finding all the linearized blocks listed in a LinearizationAdvisor object.

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 Model Linearizer. For more information on finding specific blocks in linearization results, see Find Blocks in Linearization Results Matching Specific Criteria.

When you use this query object with the find command, the LinearizationAdvisor object returned by find contains the same blocks as the input LinearizationAdvisor object. Therefore, it is not necessary to use linqueryAllBlocks. This command is a utility function used by the Linearization Advisor in the Model Linearizer.

Creation

Description

example

query = linqueryAllBlocks creates a query object for finding all the linearized blocks listed in a LinearizationAdvisor object.

Properties

expand all

Query type, specified as 'All Blocks'.

Query description, specified as 'All Linearized Blocks'.

Object Functions

findFind blocks in linearization results that match specific criteria

Examples

collapse all

Load the Simulink model.

mdl = 'scdpwm';
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 the linearized blocks.

qAll = linqueryAllBlocks;
advAll = find(advisor,qAll)
advAll = 
  LinearizationAdvisor with properties:

               Model: 'scdpwm'
      OperatingPoint: [1x1 opcond.OperatingPoint]
    BlockDiagnostics: [1x10 linearize.advisor.BlockDiagnostic]
           QueryType: 'All Blocks'

Alternative Functionality

App

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

Version History

Introduced in R2017b