0
votes

I am creating a .dat file with headers and data in Matlab, however when I try opening it from the folder where it is saved then I get the error that says 'file in use by another application and cannot be accessed'. This error occurs even when Matlab is closed. I can only open it as a text by right clicking on the file through the Matlab's current directory window. Why is this happening and how to resolve it?

2
check out Unlocker: filehippo.com/download_unlocker - Amro

2 Answers

1
votes

You could try:

fclose('all')

to close all open files.

1
votes

This is not supposed to happen, and, in fact, doesn't happen when I try your code on my machine (OS X, R2010a). In other words, I strongly doubt that there is any problem with the Matlab code.

Try restarting Windows, then the problem should go away for newly created, differently named files.