Azzera filtri
Azzera filtri

Why does the same function generate different results when coder.extrinsic is ON or OFF?

1 visualizzazione (ultimi 30 giorni)
In the attached file, there is a simulink block that:
  • Calls a TestFunction directly
  • Calls the TestFunction through a wrapper
at the end the result of the two function calls are compared.
If the following line:
is commented, the two function calls give the same results. However, if that line is not commented very small differences arise.
Where do these difference come from? And more importantly, how can I get exactly the same result by having following line not commented?
I have performed the test under Matlab 2013a 32bit and 2014a 32bit.

Risposte (1)

Angelo Yeo
Angelo Yeo il 26 Ago 2022
Modificato: Angelo Yeo il 26 Ago 2022
This is because math kernel libraries for code-gen fmincon and MATLAB engine's are different. This is explained in the doc "fmincon".


Scopri di più su Cluster Configuration in Help Center e File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by