PDF Report (Matlab Report Generator)

86 ビュー (過去 30 日間)
SergioVez
SergioVez 2022 年 3 月 4 日
コメント済み: SergioVez 2022 年 3 月 7 日
Hi!
I would like to generate a pdf like the one shown in the attached picture. A simple one. As a data I could have an array with the first colum being a string column with the names of the variables and a second column with the numerical data. How could I generate this pdf? I saw there is a Matlab Report Generator but I don't know how to use. It seems to have too many options.
Thanks a lot in advance!!!

採用された回答

Srijith Kasaragod
Srijith Kasaragod 2022 年 3 月 7 日
編集済み: Srijith Kasaragod 2022 年 3 月 7 日
Hi SergioVez,
You can use mlreportgen.report package to create PDF reports. The BaseTable class enables addition of MATLAB tables into the report. The following example script generates a PDF report containing a simpe table.
import mlreportgen.report.*
rpt = Report("tables",'pdf');
name= ["Adam";"Eric"];
score=[99;80];
t= BaseTable(table(name,score,'VariableNames',["Name","Score"]));
t.Title= "Student Details";
add(rpt,t);
delete(gcf);
rptview(rpt);
Hope this helps!
  1 件のコメント
SergioVez
SergioVez 2022 年 3 月 7 日
Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreate Report Programs Using the Report API についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by