dir problems

조회 수: 3 (최근 30일)
zhang
zhang 2011년 9월 14일
편집: Stephen23 2016년 9월 3일
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
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일
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
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!

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

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by