File Exchange Pick of the Week

What’s in that MAT File?

Posted by Brett Shoelson,

Brett's Pick this week is "matwho", by Benjamin Kraus.

Want to know what's in a MAT file without loading it? matwho is for you. Simple, effective, well-implemented, and useful. And fast!

Benjamin's file, which sprang from an interesting discussion on CSSM, provides an easy-to-use wrapper around MATLAB's MatGetDir MEX function. His function is often faster than querying the file with who, but quite honestly, the value of matwho arises from the relative ease of the calling syntax: I have an easier time remembering 'matwho('test.mat')' instead of 'whos('-file','test.mat').

Calling who is pretty darned fast, too...I don't think I would have gone to the trouble that Benjamin did. But I'm glad he did. ;)

Not earth-shattering, but useful nonetheless. And I enjoyed reading through some of the discussion in CSSM on the topic.

As always, I welcome your thoughts and comments. Or leave feedback for Benjamin here.


Get the MATLAB code

Published with MATLAB® R2013b

Comments are closed.

These postings are the author's and don't necessarily represent the opinions of MathWorks.