How can I run a Model Advisor subcheck programmatically?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 4 de Mzo. de 2021
Respondida: MathWorks Support Team
el 8 de Mzo. de 2021
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?
Respuesta aceptada
MathWorks Support Team
el 15 de Mzo. de 2021
You can use the syntax mentioned in this documentation page to run those subchecks programmatically:
https://www.mathworks.com/help/releases/R2020b/slcheck/ref/modeladvisor.run.html#bsk99ok-CheckIDList
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Check Model Compliance en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!