Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: problem with savefig
Posted:
Dec 5, 2012 8:18 AM


I have the same problem. I tried to check which programs are holding onto the file in windows (using Sysinternal process explorers as instructed in *1). I did not find any.
Matlab will not work at times and work a few seconds later. I usually put a pause(x), x>=3 to help, although it is not 100% reliable so if you have a loop that saves many pics it will interrupt randomly.
This is very annoying. Please advise.
Thanks.
*1: http://serverfault.com/questions/1966/howdoyoufindwhatprocessisholdingafileopeninwindows
"Michel " <slivitz@cite.net> wrote in message <ifhv9k$4gq$1@fred.mathworks.com>... > I am struggling to find a possible reason for the following error which crept up recently (and is not constant i.e works the first time I open Matlab and then is erratic) using savefig > > >> savefig('pcp_qc45nrcan','png'); > ??? Error using ==> print at 364 > C:\Données\MRCC424\Region_sud\Grille45km\Analyses_45km\pcp_qc45nrcantemp.eps: > Cannot open file: permission denied. > > Error in ==> savefig at 224 > print(fighdl, deps{:}, 'noui', renderer, res, [fname 'temp']); % > Output the eps. > > Can anybody be of any help for any direction I might examine closely? the author is not supporting savefig any longer. > > Using : savefig 2.0 with Ghostscript 8.64, Matlab 7.11(R2010b) on Windows 7 > I cannot see any restrictions writing to the directory > > The strangest part is that if I wait couple of minutes the same instructionsl might execute without any problems > Thank for any possible suggestions



