Borrar filtros
Borrar filtros

How to recompile S-functions in Simulink?

7 visualizaciones (últimos 30 días)
Laurent Vermeulen
Laurent Vermeulen el 30 de Mzo. de 2015
Respondida: Abhishek GS el 10 de Abr. de 2015
When executing my Simulink program, containing S-functions, I get the following error:
To use block 'Environnement/S-Function' in referenced models, recompile the S-function with the current version of Simulink.
The S-function I'm trying to use is one I downloaded, but I changed the code and made a new function with the new code.
How can I recompile this S-function and get rid of this error?
Thanks

Respuestas (1)

Abhishek GS
Abhishek GS el 10 de Abr. de 2015
Hi Laurent,
I am guessing you have edited the C S-Function. Once you have changed the C S-Function, you have to mex it inorder to compile and use in Simulink as a block. The command is
>>mex filename.c
Refer this link for an example.
Hope this helps, Abhishek

Categorías

Más información sobre Simulink Functions 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!

Translated by