append
Class: mlreportgen.report.Section
Namespace: mlreportgen.report
Syntax
append(section,content)
Input Arguments
section
— Section of the report
mlreportgen.report.Section
object
Section of the report, specified as an mlreportgen.report.Section
object.
content
— Content to add to section
Report API reporter | DOM object | MATLAB built-in object | cell array of objects
Content to add to the section, specified as one of these values:
Report API reporter
DOM object
Built-in MATLAB® object (many built-in MATLAB objects can be added to a
Section
reporter)Cell array of objects that can be added individually to a section
Examples
Add Content to a Section
This example generates a report that has a title page and one chapter. The chapter contains two sections, each of which contains an image. The example uses append
to add the content to the images, the images to the sections, the sections to the chapter, and the chapter and title page to the report.
Import the DOM and API packages so that you do not have to use long, fully qualified class names.
import mlreportgen.report.* import mlreportgen.dom.*
Create a report and add a title page to the report.
rpt = Report("My Report","pdf"); append(rpt,TitlePage("Title","My Report"));
Create a chapter with two sections. Add an image to each section. Add the sections to the chapter and the chapter to the report.
ch = Chapter("Images"); sect1 = Section("Boeing 747"); append(sect1,Image("b747.jpg")); append(ch,sect1); sect2 = Section("Peppers"); append(sect2,Image("peppers.png")); append(ch,sect2); append(rpt,ch);
Close and view the report.
close(rpt); rptview(rpt);
Version History
Introduced in R2020b
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)