ashow
Show algebraic loop
Description
ashow
returns a list of algebraic loops in the current
model.
ashow
returns the algebraic loop
containing the currently selected block.gcb
ashow
returns the algebraic loop
containing block s:b
b
in system s
ashow
returns the
s#n
n
th algebraic loop in the system
s
ashow
removes algebraic loop
highlighting in the current modelclear
Examples
Use ashow
to Find Algebraic Loops in the Simulink Debugger
This example shows you how to find algebraic loops and step through a simulation in the Simulink Debugger.
Highlight algebraic loops during debugging
Open the ex_sldemo_hydcyl
model Start the Simulink debugger. Select Debug > Breakpoints List > Debug Model from the toolstrip. You can also start the debugger from the MATLAB command line using sldebug
sldebug('ex_sldemo_hydcyl');
Run the debugger. In the MATLAB command prompt, enter:
ashow
Found 1 Algebraic loop(s): System number#Algebraic loop id, number of blocks in loop - 0#1, 9 blocks in loop
The ashow
command returns the algebraic loops in the model as well as the number of blocks contained within.
Find algebraic loops containing selected block
Select any nonvirtual block in the model. For example, select the PlotResults block, which is a Scope block.
In the MATLAB command prompt, enter
ashow gcb
Block sldemo_hydcyl/PlotResults isn't in an algebraic loop.
The PlotResults block does not belong in any algebraic loop.
In the MATLAB command prompt, enter
ashow gcb
- sldemo_hydcyl/Valve//Cylinder//Piston//Spring Assembly/Control Valve Flow/IC - sldemo_hydcyl/Valve//Cylinder//Piston//Spring Assembly/Control Valve Flow/signed sqrt - sldemo_hydcyl/Valve//Cylinder//Piston//Spring Assembly/Control Valve Flow/Product - sldemo_hydcyl/Valve//Cylinder//Piston//Spring Assembly/laminar flow pressure drop - sldemo_hydcyl/Valve//Cylinder//Piston//Spring Assembly/Sum7 - sldemo_hydcyl/Pump/IC - sldemo_hydcyl/Valve//Cylinder//Piston//Spring Assembly/Control Valve Flow/Sum1 (algebraic variable) - sldemo_hydcyl/Pump/Sum1 - sldemo_hydcyl/Pump/leakage (algebraic variable)
The laminar flow pressure drop block is contained in an algebraic loop with 8 other blocks.
Input Arguments
gcb
— Currently selected block
gcb
Currently selected block, specified as gcb
.
Example: ashow gcb
s:b
— Block in model
system index
:block index
Block index in the model, specified as system
index
:block index
.
Example: ashow 1:1
Data Types: double
s#n
— Algebraic loop index
system index
#loop index
Algebraic loop index, specified as system index
#loop
index
Example: ashow 0#1
Data Types: double
clear
— Remove highlighting
clear
Remove algebraic loop highlighting from model.
Version History
Introduced before R2006a
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)