MATLAB Answers

Using non reusable functions for referenced models

12 views (last 30 days)
Caroline Brandberg
Caroline Brandberg on 15 Mar 2018
Answered: Jesús Zambrano on 7 Feb 2020 at 21:23
Hi,
I'm using a Simulink model which contains referenced models and I would like to generate non-reusable functions for all models. It seems like it only works on the "top level". I have the settings "nonreusable function" for all models, but the generated code will be something like the following:
ert_main.c: my_model_step();
my_model.c: my_model_step() { ref_model_f(...); }
ref_model.c: ref_model_f(...) { ... }
Is there any settings which allows the referenced model to have a function declaration without any parameters, i.e., to make them non-reusable?

  0 Comments

Sign in to comment.

Answers (1)

Jesús Zambrano
Jesús Zambrano on 7 Feb 2020 at 21:23
Hi Caroline,
I suggest you work with atomic subsystems. With them, you will have the option of setting the function packaging to Reusable or Nonreusable.

  0 Comments

Sign in to comment.

Sign in to answer this question.