simulink模型工作区中参数的参数属性的程序化设置

发布于 2025-01-25 00:22:57 字数 258 浏览 2 评论 0原文

我正在使用一些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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风流物 2025-02-01 00:22:57

一位同事为我找到了这个问题的答案。

在模型中设置参数“ 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');

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文