How to include custom code in the generated initialize function when an initialize block is already present in the model
显示 更早的评论
How can I include custom code in the generated initialization function when an initialize block is present in the model? If I try to add custom code to the Initialize function field in the "Code Generation > Custom Code" pane of the configuration parameters I receive the following error when generating code for the model:
Addition of custom initialization and custom termination code using the 'Configuration Parameters > Code Generation > Custom Code'
dialog is not supported in models containing the Initialize, Reset or Terminate Function blocks.
I would like this custom code to only appear in the generated code and not execute when simulating.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!