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>

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by