Effacer les filtres
Effacer les filtres

Define default signal values after code generation

3 vues (au cours des 30 derniers jours)
Jonathan Adams
Jonathan Adams le 6 Déc 2023
Commenté : madhan ravi le 6 Déc 2023
I have a use case where I have bus object inputs to a Simulink model. I'd like to define default initialization values for signals in the structure that persist through Matlab/Simulink Coder such that I can either let the values be a default, or set a value if desired. Has anyone tried this before?

Réponses (1)

madhan ravi
madhan ravi le 6 Déc 2023
Yes, you can do this by defining your signal as Simulink.Signal. Make sure to set all the properties that you need for your signal.
  1 commentaire
madhan ravi
madhan ravi le 6 Déc 2023
here is an example for Simulink.Parameter but the same approach can be used for Simulink.Signal

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by