How can I run a Model Advisor subcheck programmatically?

1 回表示 (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2021 年 3 月 4 日
回答済み: MathWorks Support Team 2021 年 3 月 8 日
I am running Model Advisor check mathworks.maab.jc_0281 programmatically. The check has input parameters corresponding to different subchecks (jc_0281_a and jc_0281_b). How can I choose which subcheck to run from the command line?

採用された回答

MathWorks Support Team
MathWorks Support Team 2021 年 3 月 15 日
You can use the syntax mentioned in this documentation page to run those subchecks programmatically:
The way it works is you use the 'InputParams' optional argument, pass the subcheck name, and then pass an index corresponding to the subcheck options. For instance, if you wanted to run jc_0281_a1 and disable jc_0281_b, then you would write:
% select jc_0281_a1 and "disable" jc_0281_b
checkIDList = {{'mathworks.jmaab.jc_0281','InputParam',{'jc_0281_a', 1, 'jc_0281_b', 0}}};
sys = 'sldemo_auto_climatecontrol/Heater Control';
ModelAdvisor.run(sys, checkIDList);
You can tell which index corresponds to which option from the order in the Model Advisor Configuration Editor:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCheck Model Compliance についてさらに検索

タグ

タグが未入力です。

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by