Simulation Results of generated code and model differ

1 visualización (últimos 30 días)
mikemodanoxxx
mikemodanoxxx el 11 de Abr. de 2013
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>

Respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by