| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
Blocks and their identifiers in discrete-event simulation
blklist
blk_cell = blklist
blklist displays a list of event-based blocks and block identifiers in the model that you are debugging. The list includes all blocks for which blkinfo is valid. The list excludes virtual subsystems and Discrete Event Subsystem blocks, but includes relevant blocks inside such subsystems. In the Command Window, you can click hyperlinks to highlight the blocks in the model window.
blk_cell = blklist returns the same information as blklist in a cell array of strings. The first column of blk_cell contains block identifiers. The corresponding cells in the second column contain block path names.
In the Command Window, view the block list and store it in a variable:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_count_attributes')View the list of blocks. At the sedebug>> prompt, enter:
blklist
The output is:

Store the list of blocks in a variable and examine one row of the cell array:
x = blklist;
x{1,:}The output indicates the identifier and path name of one block in the model:
ans = blk1 ans = sedemo_count_attributes/Entity Index
End the debugger session. At the sedebug>> prompt, enter:
sedb.quit
![]() | sedb.blkinfo | sedb.breakpoints | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |