Why am I suddenly unable to run one of my MATLAB files?

I am suddenly unable to execute a MATLAB file that worked previously by entering the file name in the MATLAB command prompt. When I do this, I receive the following error:
??? Undefined function or variable myFile
For diagnostic purposes, I enter the following at the MATLAB command prompt:
which -all myFile.m
The correct path is returned. However, next to the path, an additional message reads:
no license is available

 Accepted Answer

The issue results when one of your MATLAB files has the same name as a built-in MATLAB function or is located in a directory where there exists another file that has the same name as a built-in function.
To work around this issue, you will need to find out the exact file(s) of the same name as a MATLAB built-in file. To do this you can use the command
which -all fileName
(where fileName is the name of the file)
Once you have located the file, rename it and try again. You can also resolve this by moving your file to a new folder.

More Answers (0)

Categories

Products

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!