how to include the simulation result graph image (obtained from GUI) into the Report Generator Code?

조회 수: 1 (최근 30일)
I obtain my Simulation RESULT after each calculation using the Designed GUI.
and I want to obtain a PDF report which includes this simulation result (as a part of the report) image at the end.
Kindly help me out with a detailed sample code.
  댓글 수: 2
poornima tumkur nataraj
poornima tumkur nataraj 2021년 11월 9일
Thank you for your comment.@Geoff Hayes.
Actually, the report I am creating also has components like paragraphs, tables & texts. This simulation result is just a part of the report. So I am not sure, in which part of the report code can I include the code of for publishing the simulatiom result.
Right now, my code looks basic like this.
Could you please suggest me, HOW & in which part of the code can I include the code for sim result?
import mlreportgen.report.*
import mlreportgen.dom.*
rpt = Report('output','pdf');
tp = TitlePage();
title = Paragraph(' Tests');
title.Style = {HAlign('left'),FontFamily('Arial'),...
FontSize('24pt'),Color('white'),...
BackgroundColor('blue'),...
OuterMargin('0in','0in','.5in','1in'),...
HAlign('center')};
tp.Title = title;
tp.Subtitle = 'Monthly Data';
tp.Image = which('image.jpg');
tp.Author = 'John Smith';
tp.Publisher = 'MathWorks';
tp.PubDate = date();
% here i WANT TO INCLUDE A TABLE AND THEN THE SIM RESULTS
add(rpt, tp);
close(rpt);
rptview(rpt);

댓글을 달려면 로그인하십시오.

답변 (1개)

Srijith Kasaragod
Srijith Kasaragod 2021년 11월 22일
Hi,
One way you could add simulation images to a report is to have the figure saved locally and use 'append' function.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Title Pages, Tables of Contents, Lists of Figures, Tables, and Captions에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by