Main Content

slreportgen.report.StateTransitionTable.customizeReporter

Class: slreportgen.report.StateTransitionTable
Namespace: slreportgen.report

Create custom state transition table reporter class

Since R2022a

Syntax

reporter = slreportgen.report.StateTransitionTable.customizeReporter(targetFilePath)

Description

reporter = slreportgen.report.StateTransitionTable.customizeReporter(targetFilePath) defines a subclass of slreportgen.report.StateTransitionTable 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
slreportgen.report.StateTransitionTable.customizeReporter("myFolder/MyClass")Create MyClass.m in the subfolder myFolder of the current folder.
slreportgen.report.StateTransitionTable.customizeReporter("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.

slreportgen.report.StateTransitionTable.customizeReporter("+myOrg/@MyClass")Create the reporter class in a class namespace by preceding the folder name with the + character.

Note

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.

Examples

expand all

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

mFilePath = ...
    slreportgen.report.StateTransitionTable.customizeReporter(...
                                        "d:\myClasses\myReporter")

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

mFilePath = 

    "d:\myClasses\myReporter.m"

This is the folder structure:

d:\myClasses\myReporter.m
d:\myClasses\resources\templates\docx\default.dotx
d:\myClasses\resources\templates\html\default.htmt
d:\myClasses\resources\templates\html\default.htmtx
d:\myClasses\resources\templates\pdf\default.pdftx

Version History

Introduced in R2022a