How can I generate code for a Simulink model that uses exponents without enabling support for nonfinite numbers?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a Simulink model that requires the use of exponents for some of its calculations. I would like to generate code from the model, however for a variety of reasons I can't enable support for non-finite numbers. I've tried saturating the inputs to avoid negative numbers to non integer exponents, etc., creating my own math expression using the Fcn block but despite all of this Simulink seems to think that any exponent requires NaN support. Is there a way around this?
3 Kommentare
Antworten (1)
NJ2Cali
am 27 Jun. 2023
Bearbeitet: NJ2Cali
am 27 Jun. 2023
1 Kommentar
Kiran K
am 23 Jan. 2024
Hi,
>>However, some functions (such as exponent) generate differently if NaN is supported even if they themselves don't require NaN support,
Did you solve this problem or found any workaround?. I also face similar problem.
Also, how did you manage by saturating the inputs.
When I changed below options there was no impact in generated code of exp functions
- minimum and maximum values in Inport->Signal attributes
- using saturation block
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!