メインコンテンツ

getVariableValue

クラス: slreportgen.report.ModelVariable
名前空間: slreportgen.report

モデル変数レポーターから変数の値を取得する

構文

value = getVariableValue(reporter)

説明

value = getVariableValue(reporter) は、指定されたモデル変数レポーターでレポートされるモデル変数の値を返します。

入力引数

すべて展開する

モデル変数レポーター。slreportgen.report.ModelVariable として指定します。

すべて展開する

モデル変数の結果についてレポーターを取得した後、getVariableValue メソッドを使用してレポーターから変数値を取得できます。

...
finder = slreportgen.finder.ModelVariableFinder(model);

while hasNext(finder)
    result = next(finder);
    
    % Get the ModelVariable reporter for the result
    % Get the variable value
    reporter = getReporter(result);
    value = getVariableValue(reporter);
    ...
    % Add the reporter to the chapter
    add(chapter,reporter);
end
...

バージョン履歴

R2019b で導入