toString
Class: mlreportgen.dom.Number
Namespace: mlreportgen.dom
Syntax
formattedNumber = toString(numberObj)
Description
formattedNumber = toString(
converts the
number specified by numberObj
)numberObj
to formatted text.
The conversion uses the first of these format specifications that it finds:
The specification in the
mlreportgen.dom.NumberFormat
object in theStyle
property of the object specified bynumberObj
The specification in the
NumberFormat
object in theStyle
property of the element, such as a paragraph, list, or table, that contains the specifiedNumber
objectThe default specification set by
mlreportgen.dom.setDefaultNumberFormat
If the conversion does not find a format specification, the conversion uses the maximum number of digits needed to represent the number accurately.
You can use this method to see the formatted text that results from adding a
mlreportgen.dom.Number
object to a report.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2021a