C code to S function tutorials
显示 更早的评论
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 ?
采纳的回答
更多回答(2 个)
Bruno Pop-Stefanov
2014-1-20
编辑:Bruno Pop-Stefanov
2014-1-20
1 个投票
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:
Paul
2014-1-22
0 个投票
1 个评论
Kaustubha Govind
2014-3-25
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!