Passing structure, defined in external .h, into C++ function, called from matlab function block in simulink
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Simulink Coder dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!