Why does WHAT return incorrectly when my current directory is not the folder containing the MATLAB file in question in MATLAB 7.7 (R2008b)?

2 ビュー (過去 30 日間)
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.

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 29 日
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 件)

カテゴリ

Help Center および File ExchangeSearch Path についてさらに検索

製品


リリース

R2008b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by