how to instruct embedded coder to add inline directive to generated function from slx file.

18 vues (au cours des 30 derniers jours)
Tomasz
Tomasz le 13 Jan 2026 à 18:10
Modifié(e) : Fangjun Jiang le 14 Jan 2026 à 14:01
I have .slx file with single model. Due to performance problems I need to use "inline" directive in this models. How to instruct Embedded Coder to add inline to generated function from my slx file ?
I have Matlab 2022b

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 13 Jan 2026 à 20:03
Assume the function is corresponding to an atomic subsystem block in your model, select this block, right click, select "Block Parameters (Subsystem)", in the "Code Generation" panel, choose "Inline" (instead of auto) for "Function packaging".
  3 commentaires
Fangjun Jiang
Fangjun Jiang le 14 Jan 2026 à 13:46
ok, this setting forces the code for the block to be generated directly "inline", not to generate a function with the "inline" directive, which can't be done AFAIK.
Fangjun Jiang
Fangjun Jiang le 14 Jan 2026 à 14:00
Modifié(e) : Fangjun Jiang le 14 Jan 2026 à 14:01
Or, the customized TLC file might be able to do it. Search for topic "C Function Prototype Control"

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by