Main Content

getVariableValue

Class: mlreportgen.report.MATLABVariable
Package: mlreportgen.report

Get MATLAB variable value

Syntax

value = getVariableValue(rptr)

Description

value = getVariableValue(rptr) returns the value variable specified by the Variable and Location properties of the specified MATLABVariable reporter (rptr).

Input Arguments

expand all

mlreportgen.report.MATLABVariable reporter name.

Output Arguments

expand all

MATLAB variable value. The data type of the returned value depends on the data type of the variable.

Examples

Obtain the Value of a MATLAB Workspace Variable

x = 17;
rptr = mlreportgen.report.MATLABVariable(x);
value = getVariableValue(rptr)
value =

    17
Introduced in R2018b