Way to edit variables of the Brayton cycle sample model
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dongsuk Kim
le 3 Nov 2022
Réponse apportée : Vignesh Murugavel
le 7 Nov 2022
Hello
When I load Brayton Cycle (Gas Turbine) with Custom Components - MATLAB & Simulink (mathworks.com), then these variables (pic. below_ are loaded automatically even though these are not visible through model explorer in Simulink. Is there anyone who knows how to approach and edit these variables?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1180183/image.png)
0 commentaires
Réponse acceptée
Vignesh Murugavel
le 7 Nov 2022
When you load the Brayton Cycle Model , A Model Callback is already defined to load variables,these variables values are defined in the PreLoadFcn Callback which can be viewed going on to the Modeling tab, then click Model Settings > Model Properties > PreLoadFcn.
Each time that you open the model, the PreLoadFcn callback loads the variables into the MATLAB workspace.
If you wish to do so you can also edit the variables , remove the variables or even add new variables in this PreLoadFcn callback which has been defined.
You can also load the variables defined seperately in a different MATLAB script into this Model by just entering the name of the M-script in the Callback Function.
To know more about the various types of Model Callbacks and how to make use of them refer to this link.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Model, Block, and Port Callbacks 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!