Help CenterHelp Center
Return list of variables in the model workspace of a model
varList = whos(mdlWks)
example
varList = whos(mdlWks) returns a list of the variables in the model workspace represented by the Simulink.ModelWorkspace object mdlWks.
varList
mdlWks
Simulink.ModelWorkspace
collapse all
Open the example model vdp.
vdp
open_system('vdp')
Create a Simulink.ModelWorkspace object that represents the model workspace of vdp.
mdlWks = get_param('vdp','ModelWorkspace');
Create some variables in the model workspace.
assignin(mdlWks,'myVar',5.12) assignin(mdlWks,'myOtherVar',7.22)
Display a list of the variables in the model workspace.
whos(mdlWks)
Name Size Bytes Class Attributes myOtherVar 1x1 8 double myVar 1x1 8 double
Target model workspace, specified as a Simulink.ModelWorkspace object.
List of variables, returned as a nested structure array. For details about the information in the list, see whos.
whos
Introduced before R2006a
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office