You can use the Presentation.add
method of mlreportgen.ppt.Presentation
to add new slides to an existing PowerPoint presentation in Matlab. You can use a while loop to add multiple slides to the presentation. Here's an example code:
main.m912 chars33 lines
This code opens an existing PowerPoint presentation (existing_presentation.pptx
), determines the total number of slides in the presentation, and adds five new slides to the presentation using a while loop. The while loop determines the layout index of the next slide based on the current slide number, adds a new slide using the corresponding layout, adds a title to the new slide, and decrements the slides_to_add
counter until it reaches zero. Finally, the modified presentation is saved.
gistlibby LogSnag