| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
List breakpoints in discrete-event simulation
breakpoints
b_struct = breakpoints
breakpoints displays a list of all breakpoints in the simulation. The list includes disabled breakpoints, as well as breakpoints that the debugger already hit.
b_struct = breakpoints returns a structure array that stores information about breakpoints in the simulation.
b_struct |
Structure array that stores information about breakpoints. The following table describes the fields of each structure in the array.
|
Set and view breakpoints:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_timeout')Establish breakpoints and then view them in the Command Window. At the sedebug>> prompt, enter:
tbreak 0.5 tbreak 1 tbreak 1.5 breakpoints
The output confirms the setting of breakpoints and displays the list of breakpoints:
Set b1 : Breakpoint for first operation at or after time 0.500000 Set b2 : Breakpoint for first operation at or after time 1.000000 Set b3 : Breakpoint for first operation at or after time 1.500000 List of Breakpoints: ID Type Value Enabled b1 Timed 0.5 yes b2 Timed 1 yes b3 Timed 1.5 yes
End the debugger session. At the sedebug>> prompt, enter:
sedb.quit
Manipulate the structure array that is the output from breakpoints:
Begin a debugger session for a particular model. At the MATLAB command prompt, enter:
sedebug('sedemo_timeout')Establish breakpoints and then record them in a structure variable. At the sedebug>> prompt, enter:
tbreak 0.5 tbreak 1 tbreak 1.5 b = breakpoints
The output confirms the setting of breakpoints and displays an initial view of the structure b:
Set b1 : Breakpoint for first operation at or after time 0.500000
Set b2 : Breakpoint for first operation at or after time 1.000000
Set b3 : Breakpoint for first operation at or after time 1.500000
b =
1x3 struct array with fields:
ID
Type
Value
EnabledView information about the first breakpoint:
b1 = b(1)
The output is a structure:
b1 =
ID: 'b1'
Type: 'Timed'
Value: '0.5'
Enabled: 1Store the IDs of the enabled breakpoints in a cell array, bid:
idx = find([b.Enabled]);
bid = {b(idx).ID}The output is:
bid =
'b1' 'b2' 'b3'End the debugger session. At the sedebug>> prompt, enter:
sedb.quit
sedb.bdelete | sedb.disable | sedb.evbreak | sedb.tbreak
![]() | sedb.blklist | sedb.cont | ![]() |

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 |