| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimEvents |
| Contents | Index |
| Learn more about SimEvents |
opts_struct = se_getdbopts
opts_struct = se_getdbopts returns an empty options structure that you can configure and then use as an input to the sedebug function. You can set the StartFcn field of opts_struct to a cell array of strings representing commands that the debugger executes after the debugger session begins.
Set breakpoints upon starting the debugger:
At the MATLAB command prompt, create an options structure to use in future debugger sessions:
opts_struct = se_getdbopts;
opts_struct.StartFcn = {'tbreak 1', 'tbreak 2'};For a particular model, begin a debugger session using a syntax that includes opts_struct as an input argument. Using this argument causes the debugger to execute the commands in the opts_struct.StartFcn field automatically:
sedebug('sedemo_outputswitch', opts_struct)The output in the MATLAB Command Window reflects model initialization followed by the setting of two breakpoints:
*** SimEvents Debugger *** Functions | Quick Start | Debugger Help %==============================================================================% Initializing Model sedemo_outputswitch Set b1 : Breakpoint for first operation at or after time 1.000000 Set b2 : Breakpoint for first operation at or after time 2.000000
Proceed in the simulation until the first breakpoint. At the sedebug>> prompt, enter:
cont
The output is:
%==============================================================================%
Initializing Time-Based Entity Generators
%..........................................................................%
Scheduling EntityGeneration Event (ev1)
: EventTime = 1.000000000000000
: Priority = 500
: Block = Time-Based Entity Generator
Hit b1 : Breakpoint for first operation at or after time 1.000000
%==============================================================================%
Executing EntityGeneration Event (ev1) Time = 1.000000000000000
: Entity = <none> Priority = 500
: Block = Time-Based Entity GeneratorEnd the debugger session. At the sedebug>> prompt, enter:
sedb.quit
![]() | help | se_getseeds | ![]() |

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 |