MATLAB: Does WHAT return incorrectly when the current directory is not the folder containing the MATLAB file in question in MATLAB 7.7 (R2008b)

currentdirectorym-fileMATLABpathr2008bwhat

I get an incorrect answer from the WHAT command if I am calling into @classfolder/private and the current directory is not the directory where @classfolder resides.
This behavior does not occur in MATLAB 7.6 (R2008a).
Reproduction steps:
1. Create in the MATLAB path, a folder called @myclassfold. Inside of that, place a folder called private. Inside of that, place a function MATLAB file called myprivatefunc.m.
PATHDIRECTORY
|__@myclassfold
|__private
|__myprivatefunc.m
2. Set your current directory to be something else. It must NOT be the folder where @myclassfold resides.
3. Execute the following call to WHAT at the MATLAB Command Prompt:
what @myclassfold/private
4. I receive the following error:
@myAtclass\private not found.

Best Answer

There are two ways to obtain a correct result from the WHAT command:
1. Set the current directory to the folder that contains the @classfolder.
2. Specify the entire path as an input to WHAT such as:
what('C:\Work\@myAtclass/private')