Borrar filtros
Borrar filtros

MEX File slows Simulink

2 visualizaciones (últimos 30 días)
Fayez Alruwaili
Fayez Alruwaili el 22 de Mzo. de 2021
Editada: Pratheek Punchathody el 5 de Abr. de 2021
Dear all,
I have been able to build a mex function that interface a c++ code and input realtime data into simulink using the coder.extrinsic commnad. It works fine although the main issue is the time has slowed extensively. Any ideas on how to solve this issue?
Thanks so much

Respuestas (1)

Pratheek Punchathody
Pratheek Punchathody el 30 de Mzo. de 2021
Editada: Pratheek Punchathody el 5 de Abr. de 2021
As per my understanding, one of the reason for slower simulink is because your model might include a MATLAB file S-function. MATLAB file S-functions also call the MATLAB execution engine at each time step. Consider converting the S-function either to a subsystem or to a C-MEX file S-function.
You can also refer to some of the other reasons for slow down of simulink here.
Refer to the documentation on Design Your Model for Effective Acceleration which helps to know about the techniques that you can use to speeduo model simulations.

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by