0

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.

Bensa
  • 127
  • 2
  • 13

1 Answers1

0

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

jack
  • 106
  • 9
  • Ok, thank you. I'd like to have all figures in one ppt file though. Is there a way to define the page numbers using saveppt? – Bensa Aug 17 '15 at 19:21