Problem running and editing Matlab scripts
34 次查看(过去 30 天)
显示 更早的评论
Recently I began having a problem with Matlab where I'm unable to open and edit or run a script without getting an error message from Matlab editor saying,
"Error writing [File I'm trying to run/save] [Location of file on disk] (The process cannot access the file because it is being used by another process)".
This only happens after I've opened any saved file and edited it. After editing I cannot run or save the file without getting this error message. I can however start a new file and am able to both save it and run it multiple times without any problems. As soon as I close and reopen it again, I get the error message.
Is there something I accidentally changed? I have checked all the permissions in Windows and I should have no problem reading or writing files.
Matlab R2013a, Windows 7 Enterprise
3 个评论
Star Strider
2014-3-22
编辑:Star Strider
2014-3-22
The only diagnostic I can think of is to open Task Manager to see if any other application could be open that might access ‘.m’ files. Does any other application associate with ‘.m’ files?
It may be time to ask Support for help.
回答(2 个)
Image Analyst
2014-3-22
What is the folder of the file? Is it under c:\Program Files? If so, you're out of luck. If not, what is the folder? There are other folders that you're supposed to be able to write into but sometimes can't (like c:\ProgramData) and others that you think you should be able to but can't (like c:\users).
Close MATLAB and type Ctrl-Shift-Esc. Click the process tab. Do you still see an instance of MATLAB running?
If you don't see it, then you need to download "unlocker" http://download.cnet.com/Unlocker/3000-2248_4-10493998.html. Install that and when you get a file collision it will tell you what's got the file locked and give you the opportunity to pry it's grip off your file. Then once you see what other process has locked your file then maybe you can do something to avoid it in the future.
7 个评论
Image Analyst
2014-3-24
I've run out of ideas. You might have to call the Mathworks. They can set up a Webex session with you, and drive your computer, and solve it for you.
asiya
2016-1-25
I had the same issue, while trying different options I found that command+0 helped me to get out of that freeze.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!