From: Gerard on
this error is fairly new and pops up in xp and win7. I have a loop that processes a number of files and on random files i get a message :
??? Error using ==> imwrite at 453
Can't open file "C:\Users\gerard\Desktop\6-15-2010\45 gain=2 pF\Corrected sequence
of object 30C.tif" for writing.
You may not have write permission.

some work some do not, they are all named the same way. If i go into the section of code that does the writing and copy and paste that section it works but it part of a bigger loop so i cant really continue without restarting. i thought it got better when i put a pause(5) before the actually loop that does the writing to the disk.
the section of code that fails looks like
for zz=1:50
temptemp=uint16(mid_nucd(:,:,zz));
imwrite(temptemp',g_pathstring,'WriteMode','append','Compression','none');
end

Any ideas would be appreciated. i have used this same program hundreds of times, and this is just something new that has been happening, using 2010a, it might not have happened under 2009b.
From: Rob Campbell on

> Any ideas would be appreciated. i have used this same program hundreds of times, and this is just something new that has been happening, using 2010a, it might not have happened under 2009b.

It's a long shot, but maybe the errors you're getting are related to the file name being unsuitable.