MATLAB: How to include parameters stored in an external header file during code generation from a model using Simulink 7.8 (R2011b)

simulink coder

My Simulink model uses a lot of externally defined parameters. These parameters are collected in a data structure which is defined in an external source file with the structure defined in a header file. I want to know how to include this external source and header files in order to use these parameter values in my Simulink model.

Best Answer

The attached ZIP file contains a model which demonstrates how to include parameters defined in a source/header file. The header and source file describing the parameters are in the folder called ‘hand_code_files’. This example also includes output structures to which the data is written by the model.