Combines two expressions to a new subscripted identifier

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.


Symbol::subScript(a, b)


Creates a new subscripted identifier, such as ab. If the arguments are not yet identifiers, they are first converted into identifiers.

You can also use _, ^, $, {, and } to create arguments with superscripts and subscripts. For these arguments a new superscripted identifier appears on top of the existing ones: or .


Example 1

Even if X1 and X2 look identical, only X1 is an identifier whereas X2 is an _index-expression:

X1 := Symbol::subScript(x, 1):  X2 := x[1]:
X1, X2;   domtype(X1), domtype(X2)

Pre-scripts are possible by subscripting the empty identifier `` and appending an identifer:

Symbol::subScript(``, 1).x

Example 2

You can use the nested form of the function:

Symbol::subScript(x, Symbol::subScript(i, j))

Example 3

Use Symbol::subSuperScript or $ to create an expression with both sub- and superscript properly aligned one above the other:


If you use the shortcut $, put the expression in single quotation marks:


If you use a_b^c, it creates the subscripted expression a_b and then attaches the superscript c to that expression. In this case, the letters b and c do not appear one above the other.


The same happens when you use a nested call to Symbol::subScript and Symbol::superScript:

Symbol::superScript(Symbol::subScript(a, b), c)

Example 4

If you want to create identifiers in which the five special characters (_, ^, $, {, }) appear explicitly, use string arguments:



a, b

Arbitrary expressions

Return Values


See Also

MuPAD Functions

Was this topic helpful?