"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!