Control the formatting of output

MuPAD® notebooks will be removed in a future release. 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.


The environment variable PRETTYPRINT determines whether the MuPAD® results are printed in the one-dimensional or the two-dimensional format.

Possible values: Either TRUE or FALSE

PRETTYPRINT controls the pretty printer, which is responsible for formatted output. If PRETTYPRINT has the value TRUE, then pretty printing is enabled for output.

The default value of PRETTYPRINT is TRUE; PRETTYPRINT has this value after starting or resetting the system via reset. Also the command delete PRETTYPRINT restores the default value.

In the MuPAD Notebook, PRETTYPRINT normally has no effect when “typesetting” is activated. An exception occurs for MuPAD output without typesetting defined, where PRETTYPRINT determines the output style even if the typesetting is activated.

Typesetting is activated by default. You can switch it on or off by selecting Notebook>Typeset Math or via View>Configure.


Example 1

The following command disables pretty printing:


Now MuPAD results are printed in a one-dimensional, linearized form:

series(sin(x), x = 0, 14)
x - x^3/6 + x^5/120 - x^7/5040 + x^9/362880 - x^11/39916800 + x^13/6227020\
800 + O(x^15)

After setting PRETTYPRINT to TRUE again, the usual two-dimensional output format is used:

series(sin(x), x = 0, 14)
     3     5     7       9         11          13
    x     x     x       x         x           x           15
x - -- + --- - ---- + ------ - -------- + ---------- + O(x  )
     6   120   5040   362880   39916800   6227020800

See Also

MuPAD Functions