Pref::abbreviateOutput

Controls the use of abbreviations in outputs

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.

Syntax

Pref::abbreviateOutput(TRUE)
Pref::abbreviateOutput(FALSE)
Pref::abbreviateOutput(NIL)
Pref::abbreviateOutput()

Description

When displaying results, MuPAD® by default finds common subexpressions and replaces them with abbreviations. See Example 1.

If you want to see the results without abbreviations, use the Pref::abbreviateOutput(FALSE) command. See Example 2.

The Pref::abbreviateOutput() command shows whether abbreviations are enabled or disabled. See Example 3.

To restore the default setting, use the Pref::abbreviateOutput(NIL) command. See Example 4.

The output of the Pref::abbreviateOutput command itself displays the previous setting. You can save this previous setting and switch to a new setting in a single call of Pref::abbreviateOutput. See Example 5.

Examples

Example 1

By default, you can see the abbreviations in long outputs:

solve(a*x^3 + b*x + c, x, MaxDegree = 3, IgnoreSpecialCases)

Example 2

Setting Pref::abbreviateOutput(FALSE), you can disable the abbreviations in outputs:

Pref::abbreviateOutput(FALSE):
solve(a*x^3 + b*x + c, x, MaxDegree = 3, IgnoreSpecialCases)

Example 3

You can check the current setting:

Pref::abbreviateOutput()

Example 4

You can restore the default setting:

Pref::abbreviateOutput(NIL):
Pref::abbreviateOutput()

Example 5

You can save the current setting and switch it to a new one in one function call:

old := Pref::abbreviateOutput(FALSE):
solve(x^3 + x + 1 = 0, x, MaxDegree = 3)

You can restore the saved setting:

Pref::abbreviateOutput(old):
solve(x^3 + x + 1 = 0, x, MaxDegree = 3)

Return Values

Previously set value TRUE or FALSE