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

2 次查看(过去 30 天)
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
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