'Load()' function cannot open a file though it exists

조회 수: 9 (최근 30일)
Haiyun Xu
Haiyun Xu 2017년 11월 5일
댓글: Haiyun Xu 2017년 11월 5일
Dear all,
I am facing this problem, where my file is located at exactly the location that I pass to my load() function but it stills prompts "Unable to read file 'location'. No such file or directory." I even used the exist() function to check the existence of that file (the answer is yes). What's going on?

채택된 답변

Kaushik Lakshminarasimhan
Kaushik Lakshminarasimhan 2017년 11월 5일
Your code is looking for a file called location which obviously doesn't exits. You need to use location as a variable name:
load(location)
  댓글 수: 1
Haiyun Xu
Haiyun Xu 2017년 11월 5일
I went back and realized it shortly after several trials; was coming back to delete this post but you've already answered it. Thank you!

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

추가 답변 (0개)

카테고리

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