Find Referenced Variables - Model Explorer

4 visualizaciones (últimos 30 días)
Dallas
Dallas el 27 de Mayo de 2011
I am looking in Model Explorer at a block in a MATLAB model (power_fuel_cell.mdl) and at the parameters. The first is "Resistance Ron" which has the variable "FC.Rohm" in it. I want to find where this variable is defined (and a few otehr vaiables which i cant find). If i right-clock on the diode model and select "Find Referenced Variables", i get no results found.... are there some variables defined somewhere in an .m file that initialise when the simulink model is run? How do i find where they are?
Thanks

Respuesta aceptada

Arnaud Miege
Arnaud Miege el 27 de Mayo de 2011
FC is calculated in the mask initialization based on the parameters you enter in the mask: right-click on the fuel cell block, select "View Mask" and go to the "Initialization tab". You'll see the following code:
block = gcb;
%%DO NOT CHANGE THIS ORDER
FuelCellCback(block,'Update')
[FC, WantBlockChoice, Ts] = FuelCellInit(block);
powericon('SetInternalModels','set',block,WantBlockChoice);
FuelCellCback(block,'')
HTH,
Arnaud
  2 comentarios
Dallas
Dallas el 27 de Mayo de 2011
Thankyou for your reply, is there any way to see how the mask parameters are used in the initialisation of FC.Rohm and other model variables? Or would their initialisation be in an encrypted ".p" file?
Arnaud Miege
Arnaud Miege el 27 de Mayo de 2011
The FuelCellInit function is p coded:
>> which -all FuelCellInit
C:\Program Files\MATLAB\R2011a\toolbox\physmod\powersys\drives\drives\FuelCellInit.p

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Naming Conventions en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by