Simulation Results of generated code and model differ
显示 更早的评论
Hi all,
i have a model with one inport input and several outputs. I generated code from the model (grt target, C) and noticed some Differences in the simulation results.
This is my test:
- Generate random inputs
- Matlab side: Use the sim-Command for simulation with the input pattern
- C side: * set input for current time using Model_U.in = ...; * simulate one step using Model_step(); * do the same until simulation is finished
- Compare results.
Has anyone an idea how i could overcome this problem? Is there an option in the code generation tab in which one could increase the accuracy? The solver options should be the same for both devices. Or is this a common problem that occurs within code generation?
1 个评论
Kaustubha Govind
2013-4-11
What Solver are you using in the model?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!