MATLAB: Am I suddenly unable to run one of the MATLAB files

MATLAB

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

Best 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.