version (2.83 KB) by Matt J
Variant of whos(). Gives memory in Kbytes and displays array dimensions even for 4D+ arrays.


Updated 29 Mar 2011

View License

"Whos" is a customized version of MATLAB's usual "whos" function.

The differences are,

(1) "Whos" will compute/display memory in kilobytes whereas "whos" displays in bytes.

(2) "Whos" will always display all array dimensions whereas "whos" will not display array dimensions for 4th and higher dimensional arrays.

EXAMPLE: Given the following arrays


using "whos" displays the following:

>> whos
Name Size Bytes Class Attributes

A 4-D 1920000 double
B 5-D 3000000 single complex

whereas Whos will display the following

>> Whos
Name Size Kilobytes Class Attributes

A 10x20x30x40 1875 double
B 5x10x15x20x25 2930 single complex

An unfortunate limitation is that Whos relies on EVALIN and so will not work correctly in a workspace context reached using DBUP and DBDOWN. I elaborate on this somewhat in this Newsgroup thread:


Hopefully, TMW will provide a way around this eventually.

Cite As

Matt J (2022). Whos (https://www.mathworks.com/matlabcentral/fileexchange/30534-whos), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!