prog::getname

Name of an object

MuPAD® notebooks will be removed in a future release. 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

prog::getname(object)

Description

prog::getname(object) returns the name of the MuPAD® object object.

The return value is a string, irrespective of the type of the input.

Names can be extracted from procedures, identifiers, function environments, domains and their methods (and strings, of course). If no name can be extracted from an object, the string "(noname)" is returned.

For all other MuPAD objects the result of expr2text(object) is returned as name.

Examples

Example 1

My own name:

prog::getname(prog::getname)

The name of a Domain:

prog::getname(Dom::ExpressionField())

The “name” of an arbitrary MuPAD object:

prog::getname(1)

prog::getname(a + 2*b)

Parameters

object

Any MuPAD object

Return Values

Name as string

See Also

MuPAD Functions