Effacer les filtres
Effacer les filtres

I have simulink model with many parameters and I want to set thes parameters in M-file and then control them from the simulink model, for example by editing or clearing these parameters via block has link directly with the Mfile

2 vues (au cours des 30 derniers jours)
controllink the simulink model via block has link with mfile

Réponse acceptée

Ilham Hardy
Ilham Hardy le 31 Juil 2012
Salem,
If the blocks you tried to explain are initialize, clear, and edit blocks (green, red, and blue), they are not entirely empty.
It is basically masked subsystems with callbacks; To check what callback each block has, do the following:
1. Right-click the subsystems.
2. Select "Block Properties"
3. select "callbacks" tab
In this case, each subsystem has a callback "OpenFcn" which will be executed when one tries to open the subsystems (double-click).
HTH, IH

Plus de réponses (1)

Sumit Tandon
Sumit Tandon le 30 Juil 2012
Modifié(e) : Sumit Tandon le 30 Juil 2012
What is your requirement?
If you want to control model parameters, you could do that by declaring model parameters as variables in MATLAB base workspace and then control their values. See: http://www.mathworks.com/help/releases/R2012a/toolbox/simulink/ug/f13-82509.html
If you want to write signal values or some text to a MATLAB file, you could look at ways to create text file from Simulink model. See: http://www.mathworks.com/support/search_results.html?q=simulink+text+file
  1 commentaire
salem
salem le 31 Juil 2012
Thanks Sumit for these info-, but I found good example and I want to follow that but the problem I couldn’t figure out how the Mfile and the block in Simulink model are linked together (the block is empty and nothing inside it and it is separate from the model) and by just click on the block in Simulink you can edit or cancel any parameter And you can find this example in the below link
It will be highly appreciated if you could help me in this matter
Thanks

Connectez-vous pour commenter.

Catégories

En savoir plus sur Create Large-Scale Model Components 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