whos
Displays the names, sizes, memory used in bytes and the class or type of each variable defined in the current session of the application.
Syntax
whos
whos('x')
Inputs
- x
- Variable name passed must be in a string format.
Outputs
- Name
- Name of the variable(s).
- Size
- Size of the variable(s).
- Bytes
- Memory used to store the variable(s).
- Class
- Type of the variable(s).
Examples
Displays information about all variables in the current session:
localVariable1 = 247;
testLocalVariable = 'Sample';
global globalVariable2;
whos
Attr Name Size Bytes Class
==== ==== ==== ===== =====
R 3x1 113 struct
globalVariable2 0x0 0 double
localVariable1 1x1 8 double
localtest 1x7 7 string
Displays information about a specific variable in the current
session:
localVariable1 = 247;
testLocalVariable = 'Sample';
global globalVariable2;
whos('localVariable1')
Attr Name Size Bytes Class
==== ==== ==== ===== =====
localVariable1 1x1 8 double
Comments
If an optional second argument, x, is passed, only the the information regarding x is returned.