who am i in matlab

To see the list of all variables in the current workspace in MATLAB, you can use the who command. Simply type who in the command-line and press enter. This will display a list of all variables along with their sizes and data types.

main.m
>> who
ans          % size: 1x1, class: double
myArray      % size: 3x3, class: double
myFunction   % size: 1x1, class: function_handle
136 chars
5 lines

You can also use the whos command to see more detailed information about each variable.

main.m
>> whos
  Name             Size                 Bytes  Class         Attributes

  ans              1x1                      8  double                  
  myArray          3x3                     72  double                  
  myFunction       1x1                    144  function_handle
288 chars
7 lines

The whos command provides additional information such as the number of bytes each variable uses in memory and any attributes associated with the variables.

gistlibby LogSnag