Borrar filtros
Borrar filtros

Undefined function or variable

9 visualizaciones (últimos 30 días)
Thao Ha
Thao Ha el 4 de Dic. de 2017
Comentada: Thao Ha el 5 de Dic. de 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 comentarios
KL
KL el 5 de Dic. de 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 el 5 de Dic. de 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.

Iniciar sesión para comentar.

Respuestas (2)

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

Iniciar sesión para comentar.


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

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by