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.


Controls the output of aliased expressions

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.




An alias is an abbrevation for a MuPAD® expression. If Pref::alias is enabled, the alias abbrevations will be used for output.

Pref::alias() returns the current value.

Pref::alias(TRUE) switches the usage of alias abbrevations in outputs on. This is the default setting.

Pref::alias(FALSE) switches the usage of aliases in outputs off.

Pref::alias(NIL) restores the default value which is TRUE.

Pref::alias has no effect on print and fprint.

Environment Interactions

Pref::alias changes the output of aliased expressions.


Example 1

If an aliased expression occurs in output, it is replaced by the alias abbrevation:

alias(X = a + b):
X, a + b

This only works if the syntactical structure of expression matches the aliased expression:


prog::exprtree shows that 2*X does not contain a + b any more:

prog::exprtree(X): prog::exprtree(2*X):
+-- a
`-- b
+-- _mult
|   |
|   +-- a
|   |
|   `-- 2
`-- _mult
    +-- b
    `-- 2

The same holds for X+c:

X + c; prog::exprtree(X + c):

+-- a
+-- b
`-- c

With Pref::alias(FALSE) the back translation of aliases in the output is disabled:


Pref::alias has no effect on print and fprint outputs:


Return Values

Previously set value

See Also

MuPAD Functions

Was this topic helpful?