How to include custom code in the generated initialize function when an initialize block is already present in the model
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!