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
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Search Path에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!