Main Content


Create custom state transition table reporter class

Since R2022a


reporter =


reporter = defines a subclass of in a newly created MATLAB® program file (.m) in the folder specified by targetFilePath. The method creates or uses the existing resources/templates subfolder, in the folder specified by targetFilePath, and copies the default template files of the StateTransitionTable class into the subfolder. Use the created subclass as a starting point for creating your custom version of the StateTransitionTable reporter.

Input Arguments

expand all

Path and name of the new class definition file, specified as a string scalar or character vector.

ValueDescription"myFolder/MyClass")Create MyClass.m in the subfolder myFolder of the current folder."myFolder/@MyClass")

Create the reporter class in a class folder by preceding the class name with the @ character. Do not specify the .m extension.

See Folders Containing Class Definitions."+myOrg/@MyClass")Create the reporter class in a class namespace by preceding the folder name with the + character.


You can specify a relative path or an absolute path.

Data Types: string | char

Output Arguments

expand all

Path and file name of the new reporter class, returned as a string scalar.


expand all

This example shows how to create a subclass of the StateTransitionTable class.

mFilePath = ...

The output of the command shows the path of the created MATLAB program file.

mFilePath = 


This is the folder structure:


Version History

Introduced in R2022a