Main Content

slreportgen.report.FunctionReference.customizeReporter

Class: slreportgen.report.FunctionReference
Package: slreportgen.report

Create custom function reference reporter class

Syntax

mFilePath = slreportgen.report.FunctionReference.customizeReporter(targetFilePath)

Description

mFilePath = slreportgen.report.FunctionReference.customizeReporter(targetFilePath) defines a subclass of slreportgen.report.FunctionReference 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 FunctionReference class into the subfolder. Use the created subclass as a starting point for creating your custom version of the FunctionReference reporter.

Input Arguments

expand all

Target path for the new MATLAB program file, specified as a character vector or string scalar. You can specify targetFilePath with or without the .m file extension. You can specify either a relative path or an absolute path. The path you specify can be one of these path types:

Path TypeExampleResulting Folder Structure

Explicit path

mFilePath = FunctionReference.customizeReporter(...
                          "d:\myClasses\myReporter")
mFilePath = 

    "d:\myClasses\myReporter.m"
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

Class folder

mFilePath = FunctionReference.customizeReporter(...
                         "d:\myClasses\@myReporter")
mFilePath = 

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

Package folder

mFilePath = FunctionReference.customizeReporter(...
              "d:/myClasses/+myPackage/@myReporter")
mFilePath = 

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

To learn more about class and package folders, see Packages Create Namespaces and Folders Containing Class Definitions.

Data Types: char | string

Output Arguments

expand all

Path of the created MATLAB program file, returned as a string scalar.

Data Types: string

Version History

Introduced in R2022a