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 CenterFile Exchange에서 Update PowerPoint Presentation Content에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by