- Code Generation -> System target file -> ert.tlc
- Code Generation -> Interface -> MAT-file logging (check the box)
How do I export data from the embedded code?
7 次查看(过去 30 天)
显示 更早的评论
Hi everyone
I'm a building an MPC, to follow an optimal trajectory I have computed, for this I want to embed the code, using the simulink "build model" feature and eventually put it on an ETAS 910. But this is my first experience with this and I can't figure out what block can give me the control, state and reference signal as an output. The "To file" block gives me some data, but when you open the file its either corrupted or contains what I think is raw code.(I have tried export to both csv and xlsx)
Any help is much appreciated, as this is a new area for me! Thank you.
Kind regards
Johan Svendsen
0 个评论
回答(1 个)
Roshni Garnayak
2019-8-21
Set the following parameters under ‘Model Configuration Parameters’ (gear button available in the toolbar):
For ‘To File’ block, code generation for only RSim targets is identical to Simulink. All other embedded code generation targets support only double, one-dimensional, real signals in array with time format.
Refer to the following link to know more about the code generation capabilities of ‘To File’ block:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Code Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!