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 Center および File ExchangeTitle 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