필터 지우기
필터 지우기

Info

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

2014a Problem with "which" function, impacting xlsread and dir

조회 수: 1 (최근 30일)
Joshua Wilt
Joshua Wilt 2014년 8월 27일
마감: MATLAB Answer Bot 2021년 8월 20일
I recently upgraded to R2014a and have run into a few problems accessing certain files. If I try to use xlsread on a group of 10 .xlsx files in a particular folder, 9 work and 1 fails. It happens to be the largest file. I think the error is occurring with the "which" function, which reports that the file is not found. Odd observations: - If my current directory is set to the directory containing the file, it loads fine. (Not necessary for the other 9 files) - If I open the problematic .xlsx file, save it, and then load, it loads without a problem. If I try to use xlsread the following day (on something re-saved the previous day), xlsread fails.
I just experienced the same sort of error with the dir function trying to load a large .mat file. which.m says the file isn't found (but the exist.m function returns 1)
I'm running Windows 7 on a 64bit machine.
Anyone have a similar experience or ideas on how to make these functions work?
Thanks,
Josh
  댓글 수: 1
Geoff Hayes
Geoff Hayes 2014년 8월 27일
Joshua - you state that I think the error is occurring with the "which" function, which reports that the file is not found. What makes you think that? Are you using the which function in your code? Can you show us what code that you have written?
You say that the 9 work and 1 fails. What is the failure due to? Is there an error message and, if so, what is it?
Also, please include the name of this tenth file that fails unless you are in the directory containing that file.
I'd suggest making sure that your folder (with files) is included in the MATLAB search path, but it must be else you wouldn't be able to read in the other nine files.
As for, I just experienced the same sort of error with the dir function trying to load a large .mat file. which.m says the file isn't found (but the exist.m function returns 1). What do you mean by loading the file with dir? Also, if exist returns a one that suggests (according to the link) that the name is a variable in the workspace.
Please include the lines of code that you are using to load or check on that mat file.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by