Undefined function or variable

23 Ansichten (letzte 30 Tage)
Thao Ha
Thao Ha am 4 Dez. 2017
Kommentiert: Thao Ha am 5 Dez. 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 Kommentare
KL
KL am 5 Dez. 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 am 5 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

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

Melden Sie sich an, um zu kommentieren.


Walter Roberson
Walter Roberson am 5 Dez. 2017
You need to contact Mathworks for installation support.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by