To add multiple new files to PowerPoint with different images within a for loop and mlreportgen.ppt in Matlab, you can follow these steps:
ppt = mlreportgen.ppt.Presentation('path/to/file.pptx');slide = add(ppt,'Title and Content');.replace(slide,'Content',Picture('path/to/image.jpg'));. You can change the 'path/to/image.jpg' to be the file path of the image you want to insert on each iteration of the loop.Here is an example implementation of the above steps:
main.m281 chars11 lines
This code will create a new slide for each image in the imageFiles list and insert the corresponding image onto the slide. Finally, it will close the PowerPoint file.
gistlibby LogSnag