Windows users are more likely to have issues with a locked file in one program that was used in another program. This happens in many programs including Python, Matlab and GNU Octave since Windows locks the open file by default.
Matlab symptoms arise from scenarios including:
- HDF5 file that was previously accessed in Matlab
- .m files and folders that were previously edited in Matlab
- other text files opened in Matlab Editor
The first think to try in Matlab or GNU Octave is:
which closes all open files.
If this fails, there could be a bug in Matlab or your code that isn’t closing the file.
This can happen when error catching doesn’t have an
fclose() inside the
The last resort workaround is:
- completely close all Matlab sessions
- move or delete the files that Matlab previously accessed
- reopen Matlab