MATLAB: Access to ‘whos’ in main workspace from a function

functionwhosworkspace

How do I access the main workspace from a fucntion? I am trying to count the different types of objects' classes that exist in the main workspace, but I do not know how to get into that scope from a function.
hope that makes sense

Best Answer

Try with EVALIN function:
evalin('base','whos')