command for copy a figure and put it in a specified folder in a specified name and then close it
Mostrar comentarios más antiguos
anyone know how can copy a figure and put(for example in .bmp format) it in a specified folder for example:
dfile; % i have this and this is a specified name in string
lable; % i have this and this is a specified name in string
directory = ['\c:\ClassifyingResults\',lable];
h=figure.....
copy figure in .bmp (or other format) in name of ddfile_lable and
if exist~=7
put it in : directory % directory is defined above
close(h)
Respuesta aceptada
Más respuestas (1)
Paulo Silva
el 6 de Sept. de 2011
spy
saveas(gcf,'spy','jpg') %save into current directory
or
dfile='c:\ClassifyingResults\'; %the directory must exist
spy
saveas(gcf,[dfile 'spy'],'jpg')
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!