Simulation Results of generated code and model differ

1 回表示 (過去 30 日間)
mikemodanoxxx
mikemodanoxxx 2013 年 4 月 11 日
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:
  1. Generate random inputs
  2. Matlab side: Use the sim-Command for simulation with the input pattern
  3. C side: * set input for current time using Model_U.in = ...; * simulate one step using Model_step(); * do the same until simulation is finished
  4. 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?
Picture of simulation results: http://www.abload.de/img/tempa5p51.png>
  1 件のコメント
Kaustubha Govind
Kaustubha Govind 2013 年 4 月 11 日
What Solver are you using in the model?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by