主要内容

代码生成常量参数

代码生成器尝试首先为共享实用程序文件夹生成常量参数。如果常量参数没有生成到共享实用程序文件夹中,则在top模型的全局常量参数结构中定义它们。结构的声明,ConstParam_模型,是在模型. h

/* const参数(自动存储)*/ typedef struct{/*表达式:[1 2 3 4 5 6 7]*引用:'/Constant' */ real_T Constant_Value[7];/* Expression:[7 6 5 4 3 2 1] *引用by: '/Gain' */ real_T Gain_Gain[7];} ConstParam_model;
常数参数的定义,模型_constP是在:
/ *常数参数(自动存储)* / const ConstParam_model model_ConstP ={/ *表情:(1 2 3 4 5 6 7)*引用:“< Root > /常数”* /{1.0,2.0,3.0,4.0,5.0,6.0,7.0},/ *表情:[7 6 5 4 3 2 1]*引用:“< Root > /增益”* / {7.0,6.0,5.0,4.0,3.0,2.0,1.0}};
模型_constP作为参数传递给引用的模型。

相关的话题