Petri net toolbox -- teaching discrete event systems under MATLAB. A MATLAB toolbox has been developed to handle the basic problems of discrete event dynamical systems that are modeled by Petri nets. In the Petri Net Toolbox five types of Petri nets (untimed, transition-timed, place-timed, stochastic and generalized stochastic), with finite or infinite capacity, can be used. A user-friendly graphical interface allows activating three simulation modes (accompanied or not by animation) and running specific functions that cover the key topics of analysis such as coverability tree, structural properties (including invariants), time-dependent performance indices, max-plus state-space representations. A design procedure is also available, based on parameterized models. By incorporating instruments to explore the dynamics of Petri net models, as well as animation facilities to support the intuitive understanding and to guide the users in the exploitation of the software, the Petri Net Toolbox proves to be a valuable aid for Control Engineering education.