Can we tell Matlab to write specific dynamic information in the generated report?
Show older comments
Hi, I have an inquiry to make about report generation in matlab. Suppose I have a simple program as shown in the first code. Now I would like to pass the result of the output of the function named "power" in the program to the report within the paragraph explaining that result as illustrated in the report generation code. Such that, if the output power is 2, the paragraph under "Wind power output" in the final report would read "The wind power output of the area is 2". That is, the program inserts the value of "power" in the carli brackets by itself. Is this possible? Any ideas and clues would be highly appreciated. Thank you.
b=input('enter the wind speed\n')
Powere=0.5*1.225*b^3;
%report generation code
makeDOMCompilable();
import mlreportgen.report.*
import mlreportgen.dom.*
rpt = Report('Wind Energy Assessment','docx');
tp = TitlePage;
tp.Title = 'WIND POWER POENTIAL REPORT';
tp.Author = 'GESC';
add(rpt,tp);
add(rpt,TableOfContents);
ch1 = Chapter;
ch1.Title = 'INTRODUCTION';
sec1 = Section;
sec1.Title = 'Wind power output';
para = Paragraph([' The wind power output of the area is {the program inserts the value of "power"}']);
add(sec1,para)
add(ch1,sec1)
add(rpt,ch1)
delete(gcf)
close(rpt)
rptview(rpt)
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Report Generator Task Examples in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!