simulink模型工作区中参数的参数属性的程序化设置
我正在使用一些MATLAB M脚本来批量化处理一组Simulink模型,以使用嵌入式编码来生产AutoSar软件组件。我希望某些组件使用在组件中的单独参数组件而不是共享参数中定义的端口参数。
使用MATLAB帮助文件,我设法将大多数必需的步骤脚本脚本脚本脚本,但是我有一个步骤。对于要转换为端口参数的参数,我需要进入模型工作区并为每个参数设置“参数”属性。我可以在GUI中执行此操作,但是我尚未设法找出如何脚本脚本。
谁能告诉我如何从m脚本中设置模型工作区中参数的参数属性?
I am using some Matlab m scripts to batch-process a set of Simulink models to produce Autosar software components using Embedded-Coder. I want some of the components to use Port-Parameters defined in a separate Parameter Component rather than Shared-Parameters within the component.
Using the Matlab help files I have managed to script most of the required steps but there is one step that I am stuck at. For the parameters that I want to convert to Port-Parameters, I need to go into the Model Workspace and set the "Argument" attribute for each parameter. I can do this in the GUI, but I have not managed to find out how to script this step.
Can anyone tell me how to set the Argument attribute of a parameter in the Model Workspace from an m script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一位同事为我找到了这个问题的答案。
在模型中设置参数“ param1”,“ param2”和“ param3”的参数属性:
set_param(set_param(模型,'parameterargumentNames','param1,param2,param3');
A colleague found the answer to this question for me.
To set the Argument attribute for parameters "Param1", "Param2" and "Param3" in your model:
set_param(model,'ParameterArgumentNames','Param1,Param2,Param3');