| MATLAB Function Reference | Search  Help Desk |
| who, whos | See Also |
List directory of variables in memory
Syntax
who whos who global whos global who -file filename whos -file filename who ... var1 var2 whos ... var1 var2 s = who(...) s = whos(...)
Description
who
lists the variables currently in memory.
whos
lists the current variables, their sizes, and whether they have nonzero imaginary parts.
who global and whos global
list the variables in the global workspace.
who -file filename and whos -file filename
list the variables in the specified MAT-file.
who ... var1 var2 and whos ... var1 var2
restrict the display to the variables specified. The wildcard character * can be used to display variables that match a pattern. For instance, who A* finds all variables in the current workspace that start with A. Use the functional form, such as whos('-file',filename,v1,v2), when the filename or variable names are stored in strings.
s = who(...)
returns a cell array containing the names of the variables in the workspace or file. Use the functional form of who when there is an output argument.
s = whos(...)
returns a structure with the fields
name variable name
bytes number of bytes allocated for the array
class class of variable
whos when there is an output argument.
See Also
dir, exist, help, what, workspace