MATLAB 帮助中心
Return list of variables in the model workspace of a model
varList = whos(mdlWks)
varList = whos(mdlWks) returns a list of the variables in the model workspace represented by the Simulink.ModelWorkspace object mdlWks.
varList
mdlWks
Simulink.ModelWorkspace
example
collapse all
Open the example model vdp.
vdp
openExample('simulink_general/VanDerPolOscillatorExample')
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
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处