Passing structure, defined in external .h, into C++ function, called from matlab function block in simulink
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!