Hi guys
In my project, one of the functions needs to use "dir". It gives me the following error: Index exceeds matrix dimensions.
However, the "dir" works well outside of my project.
I beg you guys' suggestions.
Thanks,

댓글 수: 3

Fangjun Jiang
Fangjun Jiang 2011년 9월 14일
How does it use the dir()? You need to show it.
zhang
zhang 2011년 9월 14일
test = dir('C:\myproject\UAIS\data\binaryKinectDataOfUAIS\zhong\view1\rgb\*.bin');
Both in the project and out the project.
Fangjun Jiang
Fangjun Jiang 2011년 9월 14일
When you run that line in MATLAB Command Window, what did you get?

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2011년 9월 14일

1 개 추천

It means inside the function you defined a variable as dir.
dbstop if error
Now run your function, it'll blow up
who dir %dir will be a variable

댓글 수: 3

Fangjun Jiang
Fangjun Jiang 2011년 9월 14일
Hah, that must be it! +1
Vishnu Narang
Vishnu Narang 2016년 9월 2일
I faced the same issue. i've updated the code but it still gives the error. There is no variable named dir now. Is there anything in matlab to clear cache or something of those sorts to get it working?
Stephen23
Stephen23 2016년 9월 3일
편집: Stephen23 2016년 9월 3일
@Vishnu Narang: clear dir or restart MATLAB. And don't use the names of inbuilt MATLAB functions!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2011년 9월 14일

편집:

2016년 9월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by