How to obtain allowed values for a configuration parameter programmatically?
2 次查看(过去 30 天)
显示 更早的评论
Hi.
I am trying to analyse/study the impact of changes in configuration parameter settings programmatically, for our Simulink model and auto generated code. I know how to set the configuration parameters programmatically, for example
set_param(configObject,'DefaultParameterBehavior','Inlined');
I also know how to obtain all configuration parameters programmatically:
get_param(configObject, 'ObjectParameters')
Now, for the study it would greatly help if I could obtain the allowed values for each parameter, for example DefaultParameterBehavior can be Inlined or Tunable, according to the help documentation (https://nl.mathworks.com/help/rtw/ref/defaultparameterbehavior.html). Is there any way of obtaining these allowed values programmatically? Such that the result will be something like
{'Inlined','Tunable'}
Thanks in advance!
0 个评论
采纳的回答
Selena Mastrodonato
2024-2-2
You can access these informations with get_param(object,'DialogParameters'). It gives you a struct with all parameters and every parameter has a field Enum with accepted values.
3 个评论
Selena Mastrodonato
2024-2-2
I don't know if this can be useful, but if you use this command get_param(0,'ObjectParameters'), you'll obtain global and model parameters, included configuration parameters.
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!