How could I save multiple MATLAB figures in Powerpoint using saveppt? I have a script that plots multiple figures and I'd like to export and save them in PowerPoint in multiple pages (one figure per page). The code below only exports the last figure.
for save = 1:plots(end)-1
slidecorner = mod(save,4);
set(save,'Position',[0 0 900 700])
saveppt('test.ppt','',figure(save))
end
Thanks in advance.
You are overwriting the figures by using the same file name through each iteration of the loop.
One way to fix this is to add the figure's iteration in its name like so:
saveppt(['Figure' num2str(save) '.ppt'])
This would yield 'Figure1.ppt', 'Figure2.ppt', 'Figure3.ppt', etc