Undefined function or variable

24 visualizzazioni (ultimi 30 giorni)
Thao Ha
Thao Ha il 4 Dic 2017
Commentato: Thao Ha il 5 Dic 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 Commenti
KL
KL il 5 Dic 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 il 5 Dic 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.

Accedi per commentare.

Risposte (2)

KL
KL il 4 Dic 2017
You still haven't answered how you set the path. Use addpath,
addpath('C:\Users\MyName\Documents\MATLAB')
  1 Commento
Thao Ha
Thao Ha il 4 Dic 2017
Modificato: Thao Ha il 4 Dic 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.

Accedi per commentare.


Walter Roberson
Walter Roberson il 5 Dic 2017
You need to contact Mathworks for installation support.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by