You probably messed up by not having the slashes correct. You should use fullfile(), like this:
folder = 'E:\matlab';
if ~isfolder(folder)
uiwait(msgbox('Please select the output folder'))
folder = uigetdir(pwd);
if folder == 0
return;
end
end
for k = 1 : whatever
baseFileName = sprintf('%03d.png', k);
fullFileName = fullfile(folder, baseFileName);
saveas(gcf, fullFileName);
end
0 Comments
Sign in to comment.