Documentation

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.

Symbol::subSuperScript

Combines three expressions to a new combined sub- and superscripted identifier

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.

Syntax

Symbol::subSuperScript(a, b, c)

Description

Creates a new combined sub- and superscripted identifier, such as . If the arguments are not yet identifiers, they are first converted into identifiers.

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

Examples

Example 1

Input of an identifier with sub- and superscript:

X1 := Symbol::subSuperScript(x, 1, 2):
X1, domtype(X1)

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

Symbol::subSuperScript(``, 1, 2).X

And at last scripts all around X:

Symbol::subSuperScript(``, 1, 2).Symbol::subSuperScript(X, 3, 4)

Example 2

You can use the nested form of the function:

Symbol::subSuperScript(x, a, Symbol::subSuperScript(b, i, j))

Example 3

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

Symbol::subSuperScript(a,b,c)

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

`a$bc`

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.

a_b^c

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:

Symbol::subSuperScript("a","b_c","d_e")

Parameters

a, b, c

Arbitrary expressions

Return Values

Identifier

See Also

MuPAD Functions

Was this topic helpful?