MATLAB: Do I receive an error when I try to execute the MATLAB files

m-fileMATLAB

I originally installed MATLAB in the C:\Program Files\MATLAB71 directory. I created some MATLAB files and put them in a subdirectory under C:\Program Files\MATLAB71 and they would run without any problem.
Now I have uninstalled MATLAB and reinstalled it in C:\MATLAB71. I copied my directory with the files to the C:\MATLAB71 directory. Now when I change my current working directory to that directory and run my MATLAB files I get the following error.
'License Unavailable'.
It happens with all my MATLAB files.

Best Answer

This happens because a particular file in that directory is corrupted. In order to work around this perform the following steps:
1. Create a new directory under C:\MATLAB71.
2. Copy any one file from your MATLAB files to this new directory.
3. Change the MATLAB working directory to this new directory.
4. Execute the MATLAB file.
5. Repeat this process until you find the corrupted file.
6. Copy the text from the corrupted file to a temporary text file and delete the corrupted file. Rename the temporary text file to name of the deleted file.