Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Pref::trailingZeroes

Trailing zeroes when printing floating-point numbers

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

Pref::trailingZeroes(value)
Pref::trailingZeroes()

Description

Pref::trailingZeroes determines, whether trailing zeroes will be appended, when floating-point numbers are printed.

If enabled (with argument TRUE), after the significant numbers of a floating-point number (behind the point) zeroes will be appended until the number of digits reaches the value of DIGITS.

A call of Pref::trailingZeroes without arguments will return the current value. The argument NIL will reset the default value, which is FALSE.

Examples

Example 1

By default, trailing zeroes will not be displayed:

DIGITS:= 10:
1.4

Display of trailing zeroes will be enabled:

Pref::trailingZeroes(TRUE):
1.4
1.400000000

The default mode is restored:

Pref::trailingZeroes(NIL):

Parameters

value

TRUE, FALSE or NIL

Return Values

Last defined value.

See Also

MuPAD Functions

Was this topic helpful?