C code to S function tutorials
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Paul
el 20 de En. de 2014
Comentada: Kaustubha Govind
el 25 de Mzo. de 2014
Hi does anyone have any good tutorial examples that i can use to get to grips with using the legacy code toolbox ?
I have some C code and I want to learn effective ways to to turn it into S code to put in my simulink model. This model will eventually be working on a real time machine.
I have been told that the legacy code tool box is my best candidate. Does anyone have any informative tutorials that might help ?
0 comentarios
Respuesta aceptada
Suneesh
el 20 de En. de 2014
Editada: Suneesh
el 20 de En. de 2014
There are several examples in Simulink documentation for the legacy code tool. Look under "Custom Blocks with S-functions, System Objects and Legacy Code Tool" in:
Do consider the S-Functions mentioned in Bruno's answer as well and choose the solution which seems more suitable for you.
0 comentarios
Más respuestas (2)
Bruno Pop-Stefanov
el 20 de En. de 2014
Editada: Bruno Pop-Stefanov
el 20 de En. de 2014
You can call a binary from a Simulink model using MEX files. A MEX file is a binary compiled from C, C++ or Fortran code that is properly formatted to work with MATLAB code. Here is a short introduction:
and here is good starting point in the MATLAB documentation:
0 comentarios
Paul
el 22 de En. de 2014
1 comentario
Kaustubha Govind
el 25 de Mzo. de 2014
As the documentation states, you also need to run legacy_code('sfcn_tlc_generate', def) in order to generate the ex_sfun_doubleit.tlc file.
Ver también
Categorías
Más información sobre Manual Performance Optimization 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!