Converting from fig to jpg for mlreportgen.ppt.Picture

3 visualizaciones (últimos 30 días)
Levi
Levi el 7 de Mzo. de 2023
Respondida: Arka el 8 de Mzo. de 2023
I have figures I need to put in a powerpoint. To add a picture to a ppt, I need it to be of class mlreportgen.ppt.Picture. The only way I've found to create an object of this class is to call mlreportgen.ppt.Picture('Path here'); The problem is that this requires it already be saved somewhere. It it too time consuming to take a figure then use saveas() to save as a .jpg, then use mlreportgen.ppt.Picture('Path here') to load it. Why should I save to disk, then load from disk, then delete the file? Surely there is some way to directly create a Picture object from a figure?

Respuestas (1)

Arka
Arka el 8 de Mzo. de 2023
Hi,
As per the documentation for mlreportgen.ppt.Picture, the only input argument it accepts is a picturePath.
To not consume unnecessary disk space, you can try saving an image to the disk, creating the corresponding Picture object, and then programmatically deleting the image.
To learn more about mlreportgen.ppt.Picture and the delete function, please go through the MathWorks documentation links below:

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by