Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Pref::alias

Controls the output of aliased expressions

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

Pref::alias(TRUE)
Pref::alias(FALSE)
Pref::alias(NIL)
Pref::alias()

Description

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.

Examples

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:

2*X

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

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

The same holds for X+c:

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

_plus
|
+-- a
|
+-- b
|
`-- c

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

Pref::alias(FALSE):
X

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

Pref::alias(TRUE):
print(X):

Return Values

Previously set value

See Also

MuPAD Functions

Was this topic helpful?