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
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!

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by