Simulation Results of generated code and model differ

1 vue (au cours des 30 derniers jours)
mikemodanoxxx
mikemodanoxxx le 11 Avr 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>
  1 commentaire
Kaustubha Govind
Kaustubha Govind le 11 Avr 2013
What Solver are you using in the model?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by