repeated -append sometimes fails with permission denied
4 次查看(过去 30 天)
显示 更早的评论
in my code I have to save data repeatedly to the same mat.file so I am using the -append command. This works fine, however, sometimes I get a permission denied error saying that it cannot save. This seems to occur randomly (i.e. I have no idea when it will happen or after how many times). What can be causing this? I am only running one matlab instance and one function so the file should not be open anymore as the next line of code is only executed when the previous save is finished, no?
1 个评论
Greg Allen
2016-4-4
If you are on OS X or Linux, you should check the file permissions. Check the file permissions on the directory, also. Another application may be changing the file permissions, so try saving in a different place with a different name.
回答(1 个)
Fangjun Jiang
2016-2-19
Use rehash after saving the file might solve this issue. From the help text of rehash:
The only time one should need to use this form is when writing out files programmatically and expecting MATLAB to find them before reaching the next MATLAB prompt.
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!