How can convert two (file.fig) to (file.jpg) in the same time?
3 views (last 30 days)
I would like to convert (file.fig) to (file.jpg) in the same time (each file contents 5 plots) to reduce the time. I used this code to convert one file.fig:
figs = openfig('Fall_ABS.fig');
for K = 1 : length(figs)
filename = sprintf('figure_%02d.jpg', K);
How can I update this code to convert two files.
Thanks in advance,
John BG on 22 Dec 2016
Edited: John BG on 25 Dec 2016
put all figures to translate to .jpg in a same folder
put all .fig in same folder
get in the folder
system('dir /o:n /b > list.txt')
measure how many figures
load all figures in workspace
save figures in same file
Riyahd, do the figure handles have to be in separate variables, or is it ok that all such handles are in a 1x10 vector of handles?
if you find my answer useful would you please mark it as Accepted Answer by clicking on the ACCEPT ANSWER button?
thanks in advance for time and attention
More Answers (1)
Jan on 17 Jan 2017
folder = cd; % Set accordingly
figs = dir(fullfile(folder, '*.fig'));
for K = 1:length(figs)
FigH = openfig(fullfile(folder, figs(K).name));
filename = fullfile(folder, sprintf('figure_%02d.jpg', K));