Passing structure, defined in external .h, into C++ function, called from matlab function block in simulink

9 次查看(过去 30 天)
I have the following C++ function, generated by matlab coder:
void Q2X_short(float Q1, float Q2, float Q3, const struct0_T *Description_Leg,
const struct1_T *Misc_Constants, float *X, float *Y, float *Z)
{
LZ = Q2+ Description_Leg->OA;
*X = LZ * cosf(Q1);
*Y = LZ * sinf(Q1);
*Z = Description_Leg->AC * (Q2+Q3)*Misc_Constants->PI;
}
to call this function from block "matlab function", I have to pass reference for structures struct0_T and struct1_T, defined in another .h file. How can I do that?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by