"You might not have write permission." error in MATLAB cloud
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm trying to save a plot as a jpg using imwrite in MATLAB cloud, but the following error occurs:
Error using imwrite
Unable to open file "/MATLAB Drive\images_d=1_w=0.05_l=0.1_N=40/img_1.png" for writing. You might not have write permission.
It's weird as when I run the same code in MATLAB desktop, everything works fine. Is there any kind of restriction about saving stuff in MATLAB cloud?
Thank you!
댓글 수: 0
채택된 답변
Walter Roberson
2023년 5월 6일
MATLAB Cloud runs on Linux systems. On Linux systems, depending on exact context, \ in a file name might just be another character, or might "introduce" a two character special sequence. There does not happen to be a special sequence designated by \i so if \i happened to occur in a context that was expecting the possibility of special sequences, then the \i might lead to an error message because of the bad sequence, or the \i might be treated as just two characters, '\' and 'i'
On Linux systems, \ is never treated as a directory separator.
Moral of the story: use fullfile() to construct paths.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Cloud Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!