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.

genident

Create an unused 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

genident()
genident(S)

Description

genident() creates an identifier not used before in the current session.

genident() creates an identifier with a name of the form Xi, where i is a positive integer. It is guaranteed that the returned identifier has not been used before in the current MuPAD® session.

If a stringS is given as argument, then genident returns an identifier with a name of the form Si, where i is a positive integer.

The returned identifier does not have a value.

Examples

Example 1

We create three new identifiers. The second identifier has a different prefix:

genident(), genident("Y"), genident()

In the next example, we assign a value to the identifier X4. Then the next two calls to genident skip the name X4:

X4 := 5:
genident(), genident()

Parameters

S

A character string

Return Values

identifier.

See Also

MuPAD Functions

Was this topic helpful?