Main Content

setContext

Class:mlreportgen.report.Report
Package:mlreportgen.report

Set report context value

Syntax

setContext(report,key,cvalue)

Description

setContext(report,key,cvalue)stores the context value (cvalue) specified by thekeyon the report object. You can then use thegetContextmethod to retrieve the value. The context values and keys are stored in acontainers.Mapobject.

Input Arguments

expand all

Report, specified as a report object. To create thereportinput, usemlreportgen.report.Report.

Key to associate with context value, specified as a numeric, real scalar, string, or cell array.

Context value associated with specified key, specified as any type of value.

Version History

Introduced in R2017b