Why does WHAT return incorrectly when my current directory is not the folder containing the MATLAB file in question in MATLAB 7.7 (R2008b)?
1 view (last 30 days)
Show older comments
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.
Accepted Answer
MathWorks Support Team
on 29 Jun 2009
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')
0 Comments
More Answers (0)
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!