Converting from fig to jpg for mlreportgen.ppt.Picture

조회 수: 6 (최근 30일)
Levi
Levi 2023년 3월 7일
답변: Arka 2023년 3월 8일
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?

답변 (1개)

Arka
Arka 2023년 3월 8일
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:

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by