Documentation

MATLAB Discrete-Event System

MATLAB discrete-event system

Library

SimEvents® Library: User-Defined

Description

This block allows you to create and author discrete-event systems in MATLAB® using the MATLAB System block. With this block, you can author an event-driven entity-flow system using MATLAB, and use it in your Simulink® model.

Parameters

System object name

Specify the full name of the user-defined discrete-event System object™ class without the file extension. This entry is case sensitive. The class name must exist on the MATLAB path.

You can specify a discrete-event System object name in one of these ways:

  • Enter the name in the text box.

  • Click the list arrow attached to the text box. If valid System objects exist in the current folder, the names appear in the list. Select a System object from this list.

  • Browse to a folder that contains a valid discrete-event System object. If the folder is not on your MATLAB path, the software prompts you to add it.

If you need to create a discrete-event System object, you can create one from a template by clicking New.

After you save the SimEvents System object, the name appears in the System object name text box.

Use the full name of the user-defined discrete-event System object class name. The block does not accept a MATLAB variable that you have assigned to a discrete-event System object class name.

New

Click this button to create a SimEvents System object from a template.

Select one of these options.

  • Basic

    Starts MATLAB Editor and displays a template for a simple discrete-event System object using the fewest System object methods.

After you save the SimEvents System object, you can enter the name in the System object name text box.

Simulate using

Select a simulation mode.

Interpreted execution

Simulate model using all supported MATLAB functions. Choosing this option can slow simulation performance.

Code generation

On the first model run, simulate and generate code for this block using only MATLAB functions supported for code generation. If the structure of the block does not change, subsequent model runs do not regenerate the code.

Introduced in R2016a

Was this topic helpful?