"You might not have write permission." error in MATLAB cloud
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Gabriel
el 6 de Mayo de 2023
Comentada: Gabriel
el 6 de Mayo de 2023
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 comentarios
Respuesta aceptada
Walter Roberson
el 6 de Mayo de 2023
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Point Cloud Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!