Products & Services Solutions Academia Support User Community Company

Learn more about SimEvents   

sedb.bdelete - Package: sedb

Delete breakpoints in discrete-event simulation

Syntax

bdelete id1 id2 ...
bdelete(id_array)
bdelete all

Description

bdelete id1 id2 ... deletes the breakpoints having identifiers id1, id2, and so on. To see breakpoints and their identifiers, use sedb.breakpoints.

bdelete(id_array) deletes the breakpoints in the cell array id_array.

bdelete all deletes all breakpoints.

Examples

Manipulate timed breakpoints and run the simulation until a breakpoint:

  1. Begin a debugger session for a particular model. At the MATLAB command prompt, enter:

    sedebug('sedemo_timeout')
  2. Establish and view breakpoints. At the sedebug>> prompt, enter:

    tbreak 0.5
    tbreak 1
    tbreak 1.5
    breakpoints

    The output lists the 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
    
  3. Delete, disable, and enable some of the breakpoints. View the resulting list:

    bdelete b2
    disable b3
    disable b1
    enable b3
    breakpoints

    The output is:

    Deleted b2 : Breakpoint for first operation at or after time 1.000000
    Disabled b3 : Breakpoint for first operation at or after time 1.500000
    Disabled b1 : Breakpoint for first operation at or after time 0.500000
    Enabled b3 : Breakpoint for first operation at or after time 1.500000
    
    List of Breakpoints:
    
     ID        Type        Value       Enabled
     b1        Timed       0.5         no
     b3        Timed       1.5         yes
    
  4. Run the simulation until the first enabled breakpoint:

    cont

    The partial output shows that b3 is the breakpoint at which the debugger stops. The debugger ignores the disabled breakpoint, b1, and does not consider the previously deleted breakpoint, b2.

    Hit b3 : Breakpoint for first operation at or after time 1.500000
    
    %==============================================================================%
    Executing EntityGeneration Event (ev7)                Time = 1.500000000000000
    : Entity = <none>                                     Priority = 1
    : Block  = Time-Based Entity Generator
  5. End the debugger session. At the sedebug>> prompt, enter:

    sedb.quit

See Also

sedb.breakpoints | sedb.disable

How To

  


Related Products & Applications

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