Main Content

eventDestroy

Class: matlab.DiscreteEventSystem
Namespace: matlab

Create entity destroy event

Syntax

event=eventDestroy()

Description

event=eventDestroy() creates an event to destroy an entity. You can then schedule this event by returning it as an output argument when implementing an event action method, such as timer.

Output Arguments

expand all

Event that destroys the entity in current event action context.

Examples

expand all

Define an event to destroy the entity in current event action context.

function [entity,event] = entry(obj,storage,entity,src)
    % Define an event to destroy the entity in current event action
    % context.
    event = obj.eventDestroy();     
end

Version History

Introduced in R2016a