1

I'm automating my build process, but I wasn't able to change the model_target_rtw folder to something different.

I'm not talking about CodegenFolder, but about the folder that's created inside it during compilation.

I'm currently working this around by renaming the folder after compilation, but it would be grate to remove that step.

4

1 回答 1

0

您所指的文件夹是 RTW (Real Time Workshop) BuildDirectory。

您可以通过运行以下命令获取 BuildDirectory 的值:

RTW.getBuildDir('MyModel')

请参阅: https ://se.mathworks.com/matlabcentral/answers/274082-how-can-i-change-the-build-folder-of-a-model

还要看这个问题: Save generated code in a special folder in "rtwbuild"

如果您在 MATLAB 中运行此命令:

set_param(0, 'CodeGenFolder', 'C:\MyBuildDir')

然后再次运行 RTW.getBuildDir 命令,您将看到 BuildDirectory 已更改。

于 2016-06-24T13:25:42.083 回答