필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Index exceeds matrix dimensions when using copyfile() function

조회 수: 1 (최근 30일)
Carson
Carson 2011년 7월 11일
마감: MATLAB Answer Bot 2021년 8월 20일
I'm trying to write a simple batch file that includes a line that will copy a folder from one directory to another by using the copyfile() function. Each time I attempt to run the code, I get an error message:
??? Index exceeds matrix dimensions.
even though I'm not even using any matrices! Any suggestions?
Thanks!

답변 (2개)

Walter Roberson
Walter Roberson 2011년 7월 11일
Which exact line is the index problem being reported against?
If you have accidentally created your own function that is named the same thing as one of the MATLAB routines, then your function might get called.
Look at the traceback of the problem and observe the file names carefully, and try using "which -all" with them: you might find you have unintentionally invoked a routine you wrote months ago.

Lei Tian
Lei Tian 2016년 5월 25일
I recently come across the exact same problem. I tried copying a simple file to a simple directory (no matrix used at all) and got the same error(Index exceeds matrix dimensions.)
I tried the which copyfile -all command and I can see I don't have other files named same as copyfile.
Anyone knows an answer to this problem?
Thanks a lot!
Lei
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 5월 25일
Please include a complete copy of the error message, everything in red.

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by