MATLAB: How to convert ‘file.fig’ to to jpg

savefig

I have 'file.fig' that consists from 50 figures. I would like to convert them to jpeg. How can I do that?
Thanks
Riyadh

Best Answer

figs = openfig('TheFigFile.fig');
for K = 1 : length(figs)
filename = 'figure_%02d.jpg';
saveas(figs(K), filename);
end
Related Question