MATLAB: Get full path of directory that is on Matlab search path

what command

Hello,
I have a folder called 'mydir' that is in the Matlab search path but not in my current directory. Thus isdir('mydir') is true. Is there a way to easily extract the full path of 'mydir' in this scenario?
Thanks, Justin

Best Answer

One way
>> s = what('InUse');
>> s.path
ans =
h:\m\FEX\InUse
where InUse is a folder on my Matlab path