Programmatically disable "Include time as independent variable"

Hello,
I am using MATLAB/Simulink R2024b and exporting FMUs programmatically with the exportToFMU function.
In the FMU Builder wizard there is an option called "Include time as independent variable", which can be enabled or disabled through the graphical interface.
However, I have not found any documented exportToFMU name-value argument that controls this option.
My questions are:
  1. Is there a supported way to disable "Include time as independent variable" when using exportToFMU programmatically?
  2. If not, is this functionality available through an undocumented parameter or an export configuration object?
  3. If the setting is stored in the FMU Builder configuration JSON, is there a supported way to use that configuration from exportToFMU?
  4. If none of the above is possible in R2024b, is this capability planned for a future release?
My goal is to automate FMU generation without requiring any interaction with the FMU Builder GUI, while producing the same FMU that would be obtained by manually unchecking "Include time as independent variable".
Thank you for your help.
Best regards,
Víctor Sánchez Suárez

Réponses (1)

Mahita
Mahita il y a environ 7 heures
Hi Victor,
I was able to access the FMU Builder and review the model description in MATLAB R2026a. As shown in the screenshot, the variable is present in the modelDescription.xml file. Based on the variable name specified there, you may be able to control it programmatically using:
exportToFMU('myModel', ...
'IncludeTimeAsIndependentVariable','off');
Could you please check if this approach works in your case.
If this does not help resolve the issue, I would recommend reaching out to MathWorks Technical Support for further assistance, as they may be able to provide additional information or guidance:

Catégories

En savoir plus sur Physics dans Centre d'aide et File Exchange

Question posée :

le 20 Juil 2026 à 12:33

Réponse apportée :

il y a environ 17 heures

Community Treasure Hunt

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

Start Hunting!

Translated by