How to find a variable in Simulink Model
Mostrar comentarios más antiguos
I want to know the variable uses in demo sldemo_mdlref_datamngt.mdl.here assume in counter2 ,right click and if u see Model Reference Parameter there are two variables Params, ICs under Model argument values (for this instance).Can I know what it is and what are its values.I read help in Simulink but could not get relevant answer .On what basis these variables arte passed
Respuesta aceptada
Más respuestas (3)
wondful answer,to search under reference,i modified like this:
varObj = Simulink.VariableUsage(varNames,'base workspace');
unusedVars = Simulink.findVars(modelname,varObj,...
'FindUsedVars','off','SearchReferencedModels','on');
1 comentario
ahmed
el 8 de Oct. de 2024
best answer
Omid Saber
el 23 de En. de 2020
0 votos
You can do what Sebastian said to find where the parameters are used. But if you're looking for the valuesor how that parameter is initiated, you should look under the mask. For this, if the mask is linked to a library either got to the library block or break the link to library and work locally on the mask. Right click on the mask and click on Mask>Edit Mask. In the opened window go to the Initilization tabThat's where the parameters are locally defined and you can edit them.
Jerry Korulla George
el 10 de Abr. de 2025
0 votos
Here is a matlab app that I created for the same: https://github.com/jerrykorulla/SimulinkVariablesInspector/
Categorías
Más información sobre Subsystems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!