Main Content

mlreportgen.report.MATLABCode.customizeReporter

クラス: mlreportgen.report.MATLABCode
名前空間: mlreportgen.report

mlreportgen.report.MATLABCode クラスのサブクラスの作成

R2021a 以降

構文

reporter = mlreportgen.report.MATLABCode.customizeReporter(classpath)

説明

reporter = mlreportgen.report.MATLABCode.customizeReporter(classpath) は、mlreportgen.report.MATLABCode のサブクラスを定義するレポーター クラス定義ファイルを、classpath で指定された場所に作成します。また、このメソッドは、既定のレポーター テンプレートを、クラス定義ファイルを含むフォルダーの resources/templates サブフォルダーにコピーします。クラス定義ファイルを開始点として使用して、レポート用のカスタム MATLAB® コード レポーター クラスを設計できます。

入力引数

すべて展開する

新しいクラス定義ファイルのパスと名前。string スカラーまたは文字ベクトルとして指定します。

説明
mlreportgen.report.MATLABCode.customizeReporter("myFolder/MyClass")現在のフォルダーのサブフォルダー myFolderMyClass.m を作成します。
mlreportgen.report.MATLABCode.customizeReporter("myFolder/@MyClass")

クラス名の前に @ 文字を付けて、クラス フォルダー内にレポーター クラスを作成します。拡張子 .m は指定しないでください。

クラス定義を含むフォルダーを参照してください。

mlreportgen.report.MATLABCode.customizeReporter("+myOrg/@MyClass")フォルダー名の前に + 文字を付けて、クラス名前空間内にレポーター クラスを作成します。

メモ

相対パスまたは絶対パスを指定できます。

データ型: string | char

出力引数

すべて展開する

新しいレポーター クラスのパスとファイル名。string スカラーとして返されます。

すべて展開する

カスタム mlreportgen.report.MATLABCode レポーター myMATLABCode、および関連する既定のテンプレートを現在の作業フォルダーのサブフォルダー MyFolder に作成します。

mlreportgen.report.MATLABCode.customizeReporter("myFolder/myMATLABCode")
ans = 

    "myFolder\myMATLABCode.m"

バージョン履歴

R2021a で導入