Move file into folder
Ältere Kommentare anzeigen
I want to move a created file into created folder. Where is wrong in my code:
for ii=0:10:360
for jj=0:10:90
%%%create a multiple folder
newdir=sprintf('view%2d',ii,jj);
mkdir(fullfile(newdir));
%rotate masks
for i=1:360
rotate(aa,[0,0,1],1);
% print figure with rotate
eval(['print -dpng Slice_' num2str(i) '.png']);
%move figure into folder
movefile('Slice_(i),view%2d',ii,jj')
% pause time
pause(2);
end
end
end
Akzeptierte Antwort
Weitere Antworten (2)
Use the functional syntax of print to print directly to the dir
print('-dpng', fullfile(newdir, ['Slice_' num2str(i) '.png']))
1 Kommentar
viet le
am 1 Sep. 2016
Kategorien
Mehr zu Environment and Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!