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

4 ビュー (過去 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 Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by