Query object for finding blocks that linearize to zero
linqueryIsZero creates a custom query object for finding all
the blocks in a linearization result that linearize to zero.
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
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.
query object for finding all the blocks in a
query = linqueryIsZero
LinearizationAdvisor object that linearize to zero.
QueryType — Query type
'Linearized to Zero' (default) | character vector
Query type, specified as
'Linearized to Zero'.
Description — Query description
'Blocks Linearized to Zero' (default) | character vector
Query description, specified as
'Blocks Linearized to
Zero'. You can add your own description to the query object
using this property.
After creating a
linqueryIsZero query object, you can:
Find all the blocks in a
LinearizationAdvisorobject that linearize to zero by using the
linqueryIsZeroquery directly with the
CompoundQueryobject by logically combining the
linqueryIsZeroquery with other query objects.
|Find blocks in linearization results that match specific criteria|
Find All Blocks That Linearize to Zero
Load the Simulink model.
mdl = 'scdpendulum'; load_system(mdl)
Linearize the model and obtain the
opts = linearizeOptions('StoreAdvisor',true); io = getlinio(mdl); [sys,op,info] = linearize(mdl,io,opts); advisor = info.Advisor;
Create query object, and find all blocks that linearize to zero.
qZero = linqueryIsZero; advZero = find(advisor,qZero)
advZero = LinearizationAdvisor with properties: Model: 'scdpendulum' OperatingPoint: [1x1 opcond.OperatingPoint] BlockDiagnostics: [1x3 linearize.advisor.BlockDiagnostic] QueryType: 'Linearized to Zero'
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.
Introduced in R2017b