Main Content


Class: matlab.DiscreteEventSystem
Namespace: matlab

Define entity types of discrete-event system




entityTypes=getEntityTypesImpl(obj) defines entity types of a discrete-event system.

Input Arguments

expand all

Discrete-event System object.

Output Arguments

expand all

Entity types returned as a vector whose length is the same as the number of entity types. Each vector element is a structure containing the entity type properties:

  • Name

  • Data dimension

  • Data type

  • Complexity


expand all

Get entity types entity1 and entity2 for discrete-event system, obj.

function entityTypes = getEntityTypesImpl(obj)
    % Define entity type 'type1' with inherited data type, dimension
    % and complexity
    t1 = obj.entityType('type1');
    % Define entity type 'type2' with specified data type ('mybus'),
    % default dimension and complexity (i.e. scalar real values)
    t2 = obj.entityType('type2', 'mybus');
    % Define entity type 'type3' with specified data type ('double'),
    % dimension (2 by 3 matrix), and complexity (complex)
    t3 = obj.entityType('type3', 'double', [2 3], true);
    entityTypes = [t1, t2, t3];

Version History

Introduced in R2016a