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!