Why do I get an error when I am trying to write to a file using IMWRITE in MATLAB 7.8 (R2009a)?
Show older comments
I am trying to write to a file with IMWRITE function. I am trying to create a path to a file in a folder that does not exist:
Z = peaks; surf(Z)
axis tight
set(gca,'nextplot','replacechildren');
surf(sin(2*pi/20)*Z,Z);
F = getframe;
imwrite(F.cdata,'newFolder/testfile.jpeg','jpg')
I get the following error:
ERROR: ??? Error using ==> imwrite at 409
Can't open file "newFolder/testfile.jpeg" for writing.
You may not have write permission.
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!