How to initialize SimStruct from C code?
显示 更早的评论
I exported my Simulink model to C code by using "rtwsfcn.tlc". The output code for the S-Function was generated successfully.
Now I want to import this S function directly in a C project. So what I did is something like this.
SimStruct *S = (SimStruct *)malloc(sizeof(SimStruct));
mdlInitializeSizes(S); ... ...
But it gives some runtime error. Can anyone tell me the proper way to initialize SimStruct directly in C without using Matlab?
采纳的回答
更多回答(1 个)
yh h
2019-11-6
0 个投票
where can I fined the "SimStruct"at the matlab dir?
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!