Effacer les filtres
Effacer les filtres

Undefined function or variable

10 vues (au cours des 30 derniers jours)
Thao Ha
Thao Ha le 4 Déc 2017
Commenté : Thao Ha le 5 Déc 2017
When I tried to run the file "project.m" in the folder "C:\Users\MyName\Documents\MATLAB", it always showed the error "Undefined function or variable 'project'" even though I already set PATH for MATLAB to point to that MATLAB folder. I have a student license lasting till Oct 31, 2018
  19 commentaires
KL
KL le 5 Déc 2017
What happens if you close matlab and double-click open your m-file from your file explorer. That should open the file with its corresponding folder as working directory.
Thao Ha
Thao Ha le 5 Déc 2017
It still shows:
project 'project' is not found in the current folder or on the MATLAB path, but exists in: C:\DATA\WSU-Thao\Fall 2017\MATLAB
Change the MATLAB current folder or add its folder to the MATLAB path.

Connectez-vous pour commenter.

Réponses (2)

KL
KL le 4 Déc 2017
You still haven't answered how you set the path. Use addpath,
addpath('C:\Users\MyName\Documents\MATLAB')
  1 commentaire
Thao Ha
Thao Ha le 4 Déc 2017
Modifié(e) : Thao Ha le 4 Déc 2017
I set matlab PATH by clicking on the "Set Path" icon on toolbar. I have followed your instruction to use addpath command but it did not help. The error still remains.

Connectez-vous pour commenter.


Walter Roberson
Walter Roberson le 5 Déc 2017
You need to contact Mathworks for installation support.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by