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

5 views (last 30 days)
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?

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!