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

6 vues (au cours des 30 derniers jours)
Haiyun Xu
Haiyun Xu le 5 Nov 2017
Commenté : Haiyun Xu le 5 Nov 2017
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?

Réponse acceptée

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 commentaire
Haiyun Xu
Haiyun Xu le 5 Nov 2017
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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by