Info
This question is closed. Reopen it to edit or answer.
Problem with a generated model from Simulink Coder, the results are not the same!!
1 view (last 30 days)
Show older comments
I have a Simulink model with few blocks: Matlab fcn, Discrete Derivative, Discrete Integrator and Inport and Outport. Using the ert_shrlib.tlc system target file I have generated a DLL and after some adjustement in Visual Studio I build the model. After this I try to see if it works good, but using same values in input for the Simulink model and this generated model I obtain different output. I tryed to solve the problem even changing the DiscreteTimeIntegrator_gainvalue or also declare a variable after Initialise() or step(), the results is always different. The differerence is some units but should really be the same and I can't figure out why it isn't! Do you have any suggestion or idea?
2 Comments
Eshwar
on 29 Sep 2015
How do you supply the inputs in visual studio? For your model, can you try comparing numerical results from normal mode simulation, with software-in-the-loop mode? Are the differences within the numerical tolerance (eps) for the type? If they are different, you should contact MathWorks technical support.
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!