| Contents | Index |
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 or blkbreak is valid, including controlled Simulink® blocks and the gateway blocks. The list excludes virtual subsystems but includes relevant blocks inside virtual 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.
blk_cell |
Cell array of strings. The first column of blk_cell contains block identifiers. In the second column, the corresponding cells 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:
List of blocks in model: sedemo_count_attributes blk1 Entity Data blk3 Entity Sink blk6 Event-Based Random Number blk2 Get Attribute blk4 Set Attribute blk5 Time-Based Entity Generator
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 Data
End the debugger session. At the sedebug>> prompt, enter:
sedb.quit

Model electronic system architectures, process flows, and logistics as queuing systems or agent-based systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |