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 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 29 Giu 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')

Più risposte (0)

Categorie

Scopri di più su Search Path in Help Center e File Exchange

Prodotti


Release

R2008b

Community Treasure Hunt

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

Start Hunting!

Translated by