Passing structure, defined in external .h, into C++ function, called from matlab function block in simulink
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!