How to add a figure into PPT by using MATLAB script?

12 ビュー (過去 30 日間)
Rui Zhang
Rui Zhang 2019 年 11 月 8 日
I have trouble to add figure into a PPT with MATLAB scripts:
% --------------------
import mlreportgen.ppt.*
slides = Presentation('my_test');
add(slides,'Title Slide');
add(slides,'Title and Picture');
contents = find(slides, 'Title');
replace(contents(1),'My First Presentation');
contents(1).FontColor = 'red';
x = [0 1 2 3 4 5];
y =[6 7 8 9 10 11];
zrh = plot(x, y); hold on; grid on;
contents = find(slides, 'Picture');
add(contents(1),zrh);
close(slides);
% ---------------
After this, I opened the PPT file "my_test" and there is no figure in it.

回答 (0 件)

カテゴリ

Help Center および File ExchangeUpdate PowerPoint Presentation Content についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by